Aktueller Stand
This commit is contained in:
22
backend/node_modules/@chevrotain/cst-dts-gen/src/api.ts
generated
vendored
Normal file
22
backend/node_modules/@chevrotain/cst-dts-gen/src/api.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Rule, GenerateDtsOptions } from "@chevrotain/types"
|
||||
import { buildModel } from "./model"
|
||||
import { genDts } from "./generate"
|
||||
|
||||
const defaultOptions: Required<GenerateDtsOptions> = {
|
||||
includeVisitorInterface: true,
|
||||
visitorInterfaceName: "ICstNodeVisitor"
|
||||
}
|
||||
|
||||
export function generateCstDts(
|
||||
productions: Record<string, Rule>,
|
||||
options?: GenerateDtsOptions
|
||||
): string {
|
||||
const effectiveOptions = {
|
||||
...defaultOptions,
|
||||
...options
|
||||
}
|
||||
|
||||
const model = buildModel(productions)
|
||||
|
||||
return genDts(model, effectiveOptions)
|
||||
}
|
||||
Reference in New Issue
Block a user