UNPKG

@ton-community/tlb-parser

Version:

Parse TLB syntax into TypeScript objects

7 lines (6 loc) 788 B
import type { Grammar, MatchResult } from 'ohm-js'; import type { Program } from './ast/nodes'; export declare function parse(input: string, grammar?: Grammar | undefined): MatchResult; export declare function ast(input: string): Program; export { NodeVisitor } from './ast/visit'; export { ASTRootBase, ASTBase, Program, Declaration, Constructor, Field, FieldBuiltinDef, FieldCurlyExprDef, FieldAnonymousDef, FieldNamedDef, FieldExprDef, Combinator, Expression, CondExpr, CompareExpr, CellRefExpr, BuiltinExpr, BuiltinOneArgExpr, BuiltinZeroArgs, CombinatorExpr, MathExpr, NegateExpr, RefExpr, NameExpr, NumberExpr, FieldDefinition, TypeExpr, SimpleExpr, Reference, FieldBuiltinType, CompareOperator, BuiltinOneArgOperators, BuiltinZeroArgsOperators, MathOperator, } from './ast/nodes';