Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Token ¶
type Token int
Token is the set of lexical tokens in JavaScript (ECMA5).
const ( Illegal Token Eof Comment String Number Plus // + Minus // - Multiply // * Exponent // ** Slash // / Remainder // % And // & Or // | ExclusiveOr // ^ ShiftLeft // << ShiftRight // >> UnsignedShiftRight // >>> AddAssign // += SubtractAssign // -= MultiplyAssign // *= ExponentAssign // **= QuotientAssign // /= RemainderAssign // %= AndAssign // &= OrAssign // |= ExclusiveOrAssign // ^= ShiftLeftAssign // <<= ShiftRightAssign // >>= UnsignedShiftRightAssign // >>>= LogicalAnd // && LogicalOr // || Coalesce // ?? Increment // ++ Decrement // -- Equal // == StrictEqual // === Less // < Greater // > Assign // = Not // ! BitwiseNot // ~ NotEqual // != StrictNotEqual // !== LessOrEqual // <= GreaterOrEqual // >= LeftParenthesis // ( LeftBracket // [ LeftBrace // { Comma // , Period // . RightParenthesis // ) RightBracket // ] RightBrace // } Semicolon // ; Colon // : QuestionMark // ? QuestionDot // ?. Arrow // => Ellipsis // ... Backtick // ` PrivateIdentifier Identifier Keyword Boolean Null If In Of Do Var For New Try This Else Case Void With Const While Break Catch Throw Class Super Return Typeof Delete Switch Default Finally Extends Function Continue Debugger InstanceOf EscapedReservedWord Let Static Async Await Yield )
func LiteralKeyword ¶
LiteralKeyword returns the keyword token if literal is a keyword, a Keyword token. If the literal is a future keyword (const, let, class, super, ...), or 0 if the literal is not a keyword.
Click to show internal directories.
Click to hide internal directories.