import { Filepath } from '../types/filepath'; import { ProgramNode, SyntaxNodeIdGenerator } from '../types/nodes'; import { default as Report } from '../types/report'; import { SyntaxToken } from '../types/tokens'; export default class Parser { private tokens; private current; private errors; private contextStack; private nodeFactory; private source; private filepath; constructor(source: string, tokens: SyntaxToken[], nodeIdGenerator: SyntaxNodeIdGenerator, filepath: Filepath); private isAtEnd; private advance; private peek; private match; private check; private previous; private canHandle; private consume; private discardUntil; private gatherInvalid; parse(): Report<{ ast: ProgramNode; tokens: SyntaxToken[]; }>; private assignParents; private program; private useDeclaration; private useSpecifierList; private synchronizeUseSpecifierList; private useSpecifier; private synchronizeProgram; private elementDeclaration; private synchronizeElementDeclarationName; private synchronizeElementDeclarationAlias; private fieldDeclaration; private expression; private shouldStopFunctionApplication; private commaExpression; private shouldStopCommaExpression; private normalExpression; private expression_bp; private leftExpression_bp; private extractOperand; private functionExpression; private wildcardExpression; private blockExpression; private canBeField; private synchronizeBlock; private primaryExpression; private tupleExpression; private synchronizeTuple; private listExpression; private synchronizeList; private attribute; private synchronizeAttributeName; private attributeValue; private synchronizeAttributeValue; private attributeName; private logError; }