package js_lexer

Import Path
	github.com/evanw/esbuild/internal/js_lexer (on go.dev)

Dependency Relation
	imports 8 packages, and imported by 6 packages

Involved Source Files js_lexer.go tables.go This file was automatically generated by gen-unicode-table.js. Do not edit.
Package-Level Type Names (total 6, in which 3 are exported)
/* sort exporteds by: | */
AllOriginalComments []js_ast.Comment ApproximateNewlineCount int CommentsToPreserveBefore []js_ast.Comment HasNewlineBefore bool HasPureCommentBefore bool Identifier string IsLegacyOctalLiteral bool The log is disabled during speculative scans that may backtrack JSXFactoryPragmaComment js_ast.Span JSXFragmentPragmaComment js_ast.Span LegacyOctalLoc logger.Loc Number float64 PreserveAllCommentsBefore bool SourceMappingURL js_ast.Span StringLiteral []uint16 Token T (*T) Expect(token T) (*T) ExpectContextualKeyword(text string) This parses a single ">" token. If that is the first part of a longer token, this function splits off the first ">" and leaves the remainder of the current token as another, smaller token. For example, ">>=" becomes ">=". (*T) ExpectInsideJSXElement(token T) (*T) ExpectJSXElementChild(token T) This parses a single "<" token. If that is the first part of a longer token, this function splits off the first "<" and leaves the remainder of the current token as another, smaller token. For example, "<<=" becomes "<=". (*T) ExpectOrInsertSemicolon() (*T) Expected(token T) (*T) ExpectedString(text string) (*T) IsContextualKeyword(text string) bool (*T) IsIdentifierOrKeyword() bool (*T) Loc() logger.Loc (*T) Next() (*T) NextInsideJSXElement() (*T) NextJSXElementChild() (*T) Range() logger.Range (*T) Raw() string (*T) RawTemplateContents() string (*T) RescanCloseBraceAsTemplateToken() (*T) ScanRegExp() (*T) SyntaxError() (*T) Unexpected() 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
type LexerPanic (struct)
( T) IsAssign() bool func (*Lexer).Expect(token T) func (*Lexer).Expected(token T) func (*Lexer).ExpectInsideJSXElement(token T) func (*Lexer).ExpectJSXElementChild(token T) 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
Package-Level Functions (total 23, in which 17 are exported)
This does "ContainsNonBMPCodePoint(UTF16ToString(text))" without any allocations
This is a clone of "utf8.DecodeRuneInString" that has been modified to decode using WTF-8 instead. See https://simonsapin.github.io/wtf-8/ for more info.
This does "IsIdentifier(UTF16ToString(text))" without any allocations
See the "White Space Code Points" table in the ECMAScript standard
func NewLexerJSON(log logger.Log, source logger.Source, allowComments bool) Lexer
Does "UTF16ToString(text) == str" without a temporary allocation
Package-Level Variables (total 6, in which 2 are exported)
Package-Level Constants (total 111, in which 107 are exported)
Punctuation
If you add a new token, remember to add it to "tokenToString" too
Assignments (keep in sync with IsAssign() below)
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
Reserved words
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
"#!/usr/bin/env node"
Identifiers
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
Literals
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
Class-private fields and methods
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
Pseudo-literals
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too
If you add a new token, remember to add it to "tokenToString" too