@igorivaniuk/tlb-parser
Version:
Parse TLB syntax into TypeScript objects
48 lines (47 loc) • 2.21 kB
TypeScript
import type { Node, TerminalNode, IterationNode } from 'ohm-js';
export declare const rootNodes: {
Program(node: IterationNode): any;
SourceElement(node: Node): any;
};
export declare const constructorNodes: {
Constructor(name: TerminalNode, tag: Node): any;
ConstructorTag(node: Node): any;
};
export declare const fieldNodes: {
Fields(node: IterationNode): any;
FieldDefinition(node: Node): any;
FieldBuiltinDef(lpar: TerminalNode, name: Node, _sep: TerminalNode, type: Node, _rpar: TerminalNode): any;
FieldCurlyExprDef(lpar: TerminalNode, expr: Node, _rpar: TerminalNode): any;
FieldAnonymousDef(node: Node): any;
FieldNamedDef(name: Node, _sep: TerminalNode, expr: Node): any;
FieldExprDef(node: Node): any;
FieldAnonRef(ref: TerminalNode, _lpar: TerminalNode, fields: IterationNode, _rpar: TerminalNode): {
name: null;
isRef: boolean;
fields: any[];
};
FieldNamedAnonRef(name: Node, _sep: TerminalNode, fields: Node): any;
};
export declare const combinatorNodes: {
Combinator(name: Node, exprs: IterationNode): any;
};
export declare const exprNodes: {
MathExpr(left: Node, ops: IterationNode, rights: IterationNode): any;
MulExpr(left: Node, ops: IterationNode, rights: IterationNode): any;
CompareExpr(node: Node): any;
CompareOperatorExpr(left: Node, op: TerminalNode, right: Node): any;
CondExpr(expr: Node): any;
CondDotAndQuestionExpr(dotNode: Node, _sep: TerminalNode, condNode: Node): any;
CondQuestionExpr(left: Node, _sep: TerminalNode, condNode: Node): any;
CondTypeExpr(node: Node): any;
CondDotted(left: Node, _sep: TerminalNode, number: Node): any;
CombinatorExpr(lpar: TerminalNode, name: Node, args: IterationNode, _rpar: Node): any;
CellRefExpr(ref: TerminalNode, node: Node): any;
BuiltinExpr(node: Node): any;
NegateExpr(op: TerminalNode, node: Node): any;
BuiltinOneArg(lpar: TerminalNode, expr: Node, arg: Node, _rpar: TerminalNode): any;
BuiltinZeroArgs(expr: Node): any;
identifier(start: Node, rest: IterationNode): any;
number(node: TerminalNode): any;
Parens(lpar: TerminalNode, node: Node, _rpar: TerminalNode): any;
};