(input: string, runtime: JDLRuntime, options?: ParseOptions)
| 27 | type ParseOptions = { startRule?: string }; |
| 28 | |
| 29 | export function parse(input: string, runtime: JDLRuntime, options?: ParseOptions) { |
| 30 | const cst = getCst(input, runtime, options); |
| 31 | const astBuilderVisitor = buildJDLAstBuilderVisitor(runtime); |
| 32 | return astBuilderVisitor.visit(cst); |
| 33 | } |
| 34 | |
| 35 | export function getCst(input: string, runtime: JDLRuntime, options?: ParseOptions): CstNode { |
| 36 | const lexResult = runtime.lexer.tokenize(input); |
no test coverage detected
searching dependent graphs…