UNPKG

@ordojs/core

Version:

Core compiler and runtime for OrdoJS framework

60 lines 1.68 kB
/** * @fileoverview OrdoJS Parser - Full implementation for syntax analysis */ import { SyntaxError, type ComponentAST, type TokenStream } from '../types/index.js'; export interface ParserOptions { allowRecovery?: boolean; maxErrors?: number; } export declare class OrdoJSParser { private tokenStream; private current; private errors; private options; private filename; constructor(tokenStream: TokenStream, options?: ParserOptions, filename?: string); parse(): ComponentAST; getErrors(): SyntaxError[]; private parseComponent; private parseProps; private parseProp; private parseTypeAnnotation; private parseClientBlock; private parseServerBlock; private parseMarkupBlock; private parseReactiveVariable; private parseFunction; private parseServerFunction; private parseLifecycleHook; private parseParameters; private parseParameter; private parseStatements; private parseStatement; private parseExpression; private parseAssignment; private parseLogicalOr; private parseLogicalAnd; private parseEquality; private parseComparison; private parseTerm; private parseFactor; private parseUnary; private parseCall; private finishCall; private parsePrimary; private parseHTMLElement; private parseInterpolation; private parseTextNode; private checkLifecycleHook; private match; private check; private advance; private isAtEnd; private peek; private previous; private consume; private throwError; private synchronize; private getCurrentPosition; } //# sourceMappingURL=parser.d.ts.map