Parser class

Constructors

Parser(Lexer? lexer)

Properties

endOffset ↔ int
End offset of the last consumed token (i.e. not the one in token but the one before that)
getter/setter pair
filename → String?
no setter
hashCode → int
The hash code for this object.
no setterinherited
lexer ↔ Lexer?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token ↔ Token?
getter/setter pair

Methods

consume(int type) → void
consumeName(String name) → void
consumeSemicolon() → void
Consume a semicolon, or if a line-break was here, just pretend there was one here.
emitError() → void
fail({Token? tok, String? expected, String? message}) → dynamic
makeName(Token? tok) → Name
makePropertyName(Token? tok) → Node
next() → Token?
Returns the current token, and scans the next one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseArguments() → List<Expression>
parseArrayLiteral() → Expression
parseAssignment({bool allowIn = true}) → Expression
parseBinary(int minPrecedence, bool allowIn) → Expression
parseBlock() → BlockStatement
/// STATEMENTS /////
parseBreak() → Statement
parseConditional(bool allowIn) → Expression
parseContinue() → Statement
parseDebuggerStatement() → Statement
parseDoWhile() → Statement
parseEmptyStatement() → Statement
parseExpression({bool allowIn = true}) → Expression
parseExpressionOrLabeledStatement() → Statement
parseExpressionProgram() → Program
parseExpressionStatement() → Statement
parseFor() → Statement
parseFunction({bool inObject = false, Token? nameTok = null}) → FunctionNode
parseFunctionBody() → BlockStatement
parseFunctionDeclaration() → Statement
parseIf() → Statement
parseLeftHandSide() → Expression
parseMemberExpression(Token? newTok) → Expression
parseName() → Name
parseNewExpression() → Expression
parseObjectLiteral() → Expression
parseParameters() → List<Name>
// FUNCTIONS //////
parsePostfix() → Expression
parsePrimary() → Expression
// EXPRESSIONS //////
parseProgram() → Program
parseProperty() → Property
parseReturn() → Statement
parseStatement() → Statement
parseSwitch() → Statement
parseSwitchCaseHead() → SwitchCase
Parses a single 'case E:' or 'default:' without the following statements
parseThrow() → Statement
parseTry() → Statement
parseUnary() → Expression
parseVariableDeclarationList({bool allowIn = true}) → VariableDeclaration
parseVariableDeclarationStatement() → VariableDeclaration
parseWhile() → Statement
parseWith() → Statement
peekName(String name) → bool
requireNext(int type) → Token?
toString() → String
A string representation of this object.
inherited
tryName(String name) → bool

Operators

operator ==(Object other) → bool
The equality operator.
inherited