Versions in this module Expand all Collapse all v0 v0.14.15 Jan 31, 2022 v0.14.14 Jan 30, 2022 Changes in this version + var Keywords = map[string]T + var StrictModeReservedWords = map[string]bool + func ContainsNonBMPCodePoint(text string) bool + func ContainsNonBMPCodePointUTF16(text []uint16) bool + func DecodeWTF8Rune(s string) (rune, int) + func ForceValidIdentifier(text string) string + func IsIdentifier(text string) bool + func IsIdentifierContinue(codePoint rune) bool + func IsIdentifierContinueES5(codePoint rune) bool + func IsIdentifierES5(text string) bool + func IsIdentifierES5UTF16(text []uint16) bool + func IsIdentifierStart(codePoint rune) bool + func IsIdentifierStartES5(codePoint rune) bool + func IsIdentifierUTF16(text []uint16) bool + func IsWhitespace(codePoint rune) bool + func RangeOfIdentifier(source logger.Source, loc logger.Loc) logger.Range + func StringToUTF16(text string) []uint16 + func UTF16EqualsString(text []uint16, str string) bool + func UTF16EqualsUTF16(a []uint16, b []uint16) bool + func UTF16ToString(text []uint16) string + func UTF16ToStringWithValidation(text []uint16) (string, uint16, bool) + type Lexer struct + AllOriginalComments []js_ast.Comment + ApproximateNewlineCount int + AwaitKeywordLoc logger.Loc + CommentsToPreserveBefore []js_ast.Comment + FnOrArrowStartLoc logger.Loc + HasNewlineBefore bool + HasPureCommentBefore bool + Identifier string + IsLegacyOctalLiteral bool + IsLogDisabled bool + JSXFactoryPragmaComment logger.Span + JSXFragmentPragmaComment logger.Span + LegacyHTMLCommentRange logger.Range + LegacyOctalLoc logger.Loc + Number float64 + PreserveAllCommentsBefore bool + PrevTokenWasAwaitKeyword bool + PreviousBackslashQuoteInJSX logger.Range + SourceMappingURL logger.Span + Token T + func NewLexer(log logger.Log, source logger.Source) Lexer + func NewLexerGlobalName(log logger.Log, source logger.Source) Lexer + func NewLexerJSON(log logger.Log, source logger.Source, allowComments bool) Lexer + func (lexer *Lexer) CookedAndRawTemplateContents() ([]uint16, string) + func (lexer *Lexer) Expect(token T) + func (lexer *Lexer) ExpectContextualKeyword(text string) + func (lexer *Lexer) ExpectGreaterThan(isInsideJSXElement bool) + func (lexer *Lexer) ExpectInsideJSXElement(token T) + func (lexer *Lexer) ExpectJSXElementChild(token T) + func (lexer *Lexer) ExpectLessThan(isInsideJSXElement bool) + func (lexer *Lexer) ExpectOrInsertSemicolon() + func (lexer *Lexer) Expected(token T) + func (lexer *Lexer) ExpectedString(text string) + func (lexer *Lexer) IsContextualKeyword(text string) bool + func (lexer *Lexer) IsIdentifierOrKeyword() bool + func (lexer *Lexer) Loc() logger.Loc + func (lexer *Lexer) Next() + func (lexer *Lexer) NextInsideJSXElement() + func (lexer *Lexer) NextJSXElementChild() + func (lexer *Lexer) Range() logger.Range + func (lexer *Lexer) Raw() string + func (lexer *Lexer) RescanCloseBraceAsTemplateToken() + func (lexer *Lexer) ScanRegExp() + func (lexer *Lexer) StringLiteral() []uint16 + func (lexer *Lexer) SyntaxError() + func (lexer *Lexer) Unexpected() + type LexerPanic struct + type T uint + const TAmpersand + const TAmpersandAmpersand + const TAmpersandAmpersandEquals + const TAmpersandEquals + const TAsterisk + const TAsteriskAsterisk + const TAsteriskAsteriskEquals + const TAsteriskEquals + const TAt + const TBar + const TBarBar + const TBarBarEquals + const TBarEquals + const TBigIntegerLiteral + const TBreak + const TCaret + const TCaretEquals + const TCase + const TCatch + const TClass + const TCloseBrace + const TCloseBracket + const TCloseParen + const TColon + const TComma + const TConst + const TContinue + const TDebugger + const TDefault + const TDelete + const TDo + const TDot + const TDotDotDot + const TElse + const TEndOfFile + const TEnum + const TEquals + const TEqualsEquals + const TEqualsEqualsEquals + const TEqualsGreaterThan + const TEscapedKeyword + const TExclamation + const TExclamationEquals + const TExclamationEqualsEquals + const TExport + const TExtends + const TFalse + const TFinally + const TFor + const TFunction + const TGreaterThan + const TGreaterThanEquals + const TGreaterThanGreaterThan + const TGreaterThanGreaterThanEquals + const TGreaterThanGreaterThanGreaterThan + const TGreaterThanGreaterThanGreaterThanEquals + const THashbang + const TIdentifier + const TIf + const TImport + const TIn + const TInstanceof + const TLessThan + const TLessThanEquals + const TLessThanLessThan + const TLessThanLessThanEquals + const TMinus + const TMinusEquals + const TMinusMinus + const TNew + const TNoSubstitutionTemplateLiteral + const TNull + const TNumericLiteral + const TOpenBrace + const TOpenBracket + const TOpenParen + const TPercent + const TPercentEquals + const TPlus + const TPlusEquals + const TPlusPlus + const TPrivateIdentifier + const TQuestion + const TQuestionDot + const TQuestionQuestion + const TQuestionQuestionEquals + const TReturn + const TSemicolon + const TSlash + const TSlashEquals + const TStringLiteral + const TSuper + const TSwitch + const TSyntaxError + const TTemplateHead + const TTemplateMiddle + const TTemplateTail + const TThis + const TThrow + const TTilde + const TTrue + const TTry + const TTypeof + const TVar + const TVoid + const TWhile + const TWith + func (t T) IsAssign() bool