type github.com/evanw/esbuild/internal/js_parser.parser

183 uses

	github.com/evanw/esbuild/internal/js_parser (current package)
		js_parser.go#L34: type parser struct {
		js_parser.go#L492: func (dc *duplicateCaseChecker) check(p *parser, expr js_ast.Expr) {
		js_parser.go#L1002: func (p *parser) selectLocalKind(kind js_ast.LocalKind) js_ast.LocalKind {
		js_parser.go#L1018: func (p *parser) pushScopeForParsePass(kind js_ast.ScopeKind, loc logger.Loc) int {
		js_parser.go#L1064: func (p *parser) popScope() {
		js_parser.go#L1120: func (p *parser) popAndDiscardScope(scopeIndex int) {
		js_parser.go#L1137: func (p *parser) popAndFlattenScope(scopeIndex int) {
		js_parser.go#L1168: func (p *parser) discardScopesUpTo(scopeIndex int) {
		js_parser.go#L1187: func (p *parser) newSymbol(kind js_ast.SymbolKind, name string) js_ast.Ref {
		js_parser.go#L1204: func (p *parser) mergeSymbols(old js_ast.Ref, new js_ast.Ref) {
		js_parser.go#L1225: func (p *parser) canMergeSymbols(scope *js_ast.Scope, existing js_ast.SymbolKind, new js_ast.SymbolKind) mergeResult {
		js_parser.go#L1295: func (p *parser) declareSymbol(kind js_ast.SymbolKind, loc logger.Loc, name string) js_ast.Ref {
		js_parser.go#L1341: func (p *parser) hoistSymbols(scope *js_ast.Scope) {
		js_parser.go#L1465: func (p *parser) declareBinding(kind js_ast.SymbolKind, binding js_ast.Binding, opts parseStmtOpts) {
		js_parser.go#L1490: func (p *parser) recordUsage(ref js_ast.Ref) {
		js_parser.go#L1509: func (p *parser) ignoreUsage(ref js_ast.Ref) {
		js_parser.go#L1526: func (p *parser) callRuntime(loc logger.Loc, name string, args []js_ast.Expr) js_ast.Expr {
		js_parser.go#L1540: func (p *parser) makePromiseRef() js_ast.Ref {
		js_parser.go#L1556: func (p *parser) storeNameInRef(name string) js_ast.Ref {
		js_parser.go#L1581: func (p *parser) loadNameFromRef(ref js_ast.Ref) string {
		js_parser.go#L1616: func (p *parser) logExprErrors(errors *deferredErrors) {
		js_parser.go#L1658: func (p *parser) logArrowArgErrors(errors *deferredArrowArgErrors) {
		js_parser.go#L1670: func (p *parser) keyNameForError(key js_ast.Expr) string {
		js_parser.go#L1680: func (p *parser) checkForLegacyOctalLiteral(e js_ast.E) {
		js_parser.go#L1690: func (p *parser) parseStringLiteral() js_ast.Expr {
		js_parser.go#L1718: func (p *parser) parseProperty(kind js_ast.PropertyKind, opts propertyOpts, errors *deferredErrors) (js_ast.Property, bool) {
		js_parser.go#L2068: func (p *parser) parsePropertyBinding() js_ast.PropertyBinding {
		js_parser.go#L2147: func (p *parser) parseArrowBody(args []js_ast.Arg, data fnOrArrowDataParse) *js_ast.EArrow {
		js_parser.go#L2187: func (p *parser) parseAsyncPrefixExpr(asyncRange logger.Range, level js_ast.L) js_ast.Expr {
		js_parser.go#L2242: func (p *parser) parseFnExpr(loc logger.Loc, isAsync bool, asyncRange logger.Range) js_ast.Expr {
		js_parser.go#L2288: func (p *parser) parseParenExpr(loc logger.Loc, opts parenExprOpts) js_ast.Expr {
		js_parser.go#L2459: func (p *parser) convertExprToBindingAndInitializer(expr js_ast.Expr, invalidLog []logger.Loc, isSpread bool) (js_ast.Binding, *js_ast.Expr, []logger.Loc) {
		js_parser.go#L2481: func (p *parser) convertExprToBinding(expr js_ast.Expr, invalidLog []logger.Loc) (js_ast.Binding, []logger.Loc) {
		js_parser.go#L2555: func (p *parser) convertBindingToExpr(binding js_ast.Binding, wrapIdentifier func(logger.Loc, js_ast.Ref) js_ast.Expr) js_ast.Expr {
		js_parser.go#L2616: func (p *parser) parsePrefix(level js_ast.L, errors *deferredErrors, flags exprFlag) js_ast.Expr {
		js_parser.go#L3192: func (p *parser) parseYieldExpr(loc logger.Loc) js_ast.Expr {
		js_parser.go#L3219: func (p *parser) willNeedBindingPattern() bool {
		js_parser.go#L3239: func (p *parser) parseImportExpr(loc logger.Loc, level js_ast.L) js_ast.Expr {
		js_parser.go#L3279: func (p *parser) parseExprOrBindings(level js_ast.L, errors *deferredErrors) js_ast.Expr {
		js_parser.go#L3283: func (p *parser) parseExpr(level js_ast.L) js_ast.Expr {
		js_parser.go#L3287: func (p *parser) parseExprWithFlags(level js_ast.L, flags exprFlag) js_ast.Expr {
		js_parser.go#L3291: func (p *parser) parseExprCommon(level js_ast.L, errors *deferredErrors, flags exprFlag) js_ast.Expr {
		js_parser.go#L3312: func (p *parser) parseSuffix(left js_ast.Expr, level js_ast.L, errors *deferredErrors, flags exprFlag) js_ast.Expr {
		js_parser.go#L3967: func (p *parser) parseExprOrLetStmt(opts parseStmtOpts) (js_ast.Expr, js_ast.Stmt, []js_ast.Decl) {
		js_parser.go#L3998: func (p *parser) parseCallArgs() []js_ast.Expr {
		js_parser.go#L4029: func (p *parser) parseJSXTag() (logger.Range, string, *js_ast.Expr) {
		js_parser.go#L4076: func (p *parser) parseJSXElement(loc logger.Loc) js_ast.Expr {
		js_parser.go#L4218: func (p *parser) parseTemplateParts(includeRaw bool) (parts []js_ast.TemplatePart, legacyOctalLoc logger.Loc) {
		js_parser.go#L4247: func (p *parser) parseAndDeclareDecls(kind js_ast.SymbolKind, opts parseStmtOpts) []js_ast.Decl {
		js_parser.go#L4292: func (p *parser) requireInitializers(decls []js_ast.Decl) {
		js_parser.go#L4306: func (p *parser) forbidInitializers(decls []js_ast.Decl, loopType string, isVar bool) {
		js_parser.go#L4321: func (p *parser) parseImportClause() ([]js_ast.ClauseItem, bool) {
		js_parser.go#L4381: func (p *parser) parseExportClause() ([]js_ast.ClauseItem, bool) {
		js_parser.go#L4462: func (p *parser) parseBinding() js_ast.Binding {
		js_parser.go#L4591: func (p *parser) parseFn(name *js_ast.LocRef, data fnOrArrowDataParse) (fn js_ast.Fn, hadBody bool) {
		js_parser.go#L4741: func (p *parser) parseClassStmt(loc logger.Loc, opts parseStmtOpts) js_ast.Stmt {
		js_parser.go#L4796: func (p *parser) parseClass(classKeyword logger.Range, name *js_ast.LocRef, classOpts parseClassOpts) js_ast.Class {
		js_parser.go#L4894: func (p *parser) parseLabelName() *js_ast.LocRef {
		js_parser.go#L4904: func (p *parser) parsePath() (logger.Loc, string) {
		js_parser.go#L4916: func (p *parser) parseFnStmt(loc logger.Loc, opts parseStmtOpts, isAsync bool, asyncRange logger.Range) js_ast.Stmt {
		js_parser.go#L5035: func (p *parser) parseStmt(opts parseStmtOpts) js_ast.Stmt {
		js_parser.go#L6142: func (p *parser) addImportRecord(kind ast.ImportKind, loc logger.Loc, text string) uint32 {
		js_parser.go#L6152: func (p *parser) parseFnBody(data fnOrArrowDataParse) js_ast.FnBody {
		js_parser.go#L6171: func (p *parser) forbidLexicalDecl(loc logger.Loc) {
		js_parser.go#L6176: func (p *parser) parseStmtsUpTo(end js_lexer.T, opts parseStmtOpts) []js_ast.Stmt {
		js_parser.go#L6269: func (p *parser) generateTempRef(declare generateTempRefArg, optionalName string) js_ast.Ref {
		js_parser.go#L6286: func (p *parser) pushScopeForVisitPass(kind js_ast.ScopeKind, loc logger.Loc) {
		js_parser.go#L6308: func (p *parser) findSymbol(loc logger.Loc, name string) findSymbolResult {
		js_parser.go#L6359: func (p *parser) findLabelSymbol(loc logger.Loc, name string) (ref js_ast.Ref, isLoop bool, ok bool) {
		js_parser.go#L6473: func (p *parser) visitStmtsAndPrependTempRefs(stmts []js_ast.Stmt, opts prependTempRefsOpts) []js_ast.Stmt {
		js_parser.go#L6532: func (p *parser) visitStmts(stmts []js_ast.Stmt, kind stmtsKind) []js_ast.Stmt {
		js_parser.go#L6665: func (p *parser) mangleStmts(stmts []js_ast.Stmt, kind stmtsKind) []js_ast.Stmt {
		js_parser.go#L7115: func (p *parser) substituteSingleUseSymbolInStmt(stmt js_ast.Stmt, ref js_ast.Ref, replacement js_ast.Expr) bool {
		js_parser.go#L7174: func (p *parser) substituteSingleUseSymbolInExpr(
		js_parser.go#L7387: func (p *parser) visitLoopBody(stmt js_ast.Stmt) js_ast.Stmt {
		js_parser.go#L7396: func (p *parser) visitSingleStmt(stmt js_ast.Stmt, kind stmtsKind) js_ast.Stmt {
		js_parser.go#L7431: func (p *parser) visitForLoopInit(stmt js_ast.Stmt, isInOrOf bool) js_ast.Stmt {
		js_parser.go#L7457: func (p *parser) recordDeclaredSymbol(ref js_ast.Ref) {
		js_parser.go#L7468: func (p *parser) visitBinding(binding js_ast.Binding, opts bindingOpts) {
		js_parser.go#L7623: func (p *parser) mangleIf(stmts []js_ast.Stmt, loc logger.Loc, s *js_ast.SIf) []js_ast.Stmt {
		js_parser.go#L7737: func (p *parser) mangleIfExpr(loc logger.Loc, e *js_ast.EIf) js_ast.Expr {
		js_parser.go#L7910: func (p *parser) isAnonymousNamedExpr(expr js_ast.Expr) bool {
		js_parser.go#L7922: func (p *parser) maybeKeepExprSymbolName(value js_ast.Expr, name string, wasAnonymousNamedExpr bool) js_ast.Expr {
		js_parser.go#L7929: func (p *parser) keepExprSymbolName(value js_ast.Expr, name string) js_ast.Expr {
		js_parser.go#L7939: func (p *parser) keepStmtSymbolName(loc logger.Loc, ref js_ast.Ref, name string) js_ast.Stmt {
		js_parser.go#L7951: func (p *parser) visitAndAppendStmt(stmts []js_ast.Stmt, stmt js_ast.Stmt) []js_ast.Stmt {
		js_parser.go#L8721: func (p *parser) maybeRelocateVarsToTopLevel(decls []js_ast.Decl, mode relocateVarsMode) (js_ast.Stmt, bool) {
		js_parser.go#L8758: func (p *parser) markExprAsParenthesized(value js_ast.Expr) {
		js_parser.go#L8767: func (p *parser) markExportedDeclsInsideNamespace(nsRef js_ast.Ref, decls []js_ast.Decl) {
		js_parser.go#L8773: func (p *parser) markExportedBindingInsideNamespace(nsRef js_ast.Ref, binding js_ast.Binding) {
		js_parser.go#L8795: func (p *parser) maybeTransposeIfExprChain(expr js_ast.Expr, visit func(js_ast.Expr) js_ast.Expr) js_ast.Expr {
		js_parser.go#L8833: func (p *parser) captureValueWithPossibleSideEffects(
		js_parser.go#L8945: func (p *parser) visitTSDecorators(tsDecorators []js_ast.Expr) []js_ast.Expr {
		js_parser.go#L8952: func (p *parser) visitClass(nameScopeLoc logger.Loc, class *js_ast.Class) js_ast.Ref {
		js_parser.go#L9131: func (p *parser) visitArgs(args []js_ast.Arg, opts visitArgsOpts) {
		js_parser.go#L9163: func (p *parser) isDotDefineMatch(expr js_ast.Expr, parts []string) bool {
		js_parser.go#L9201: func (p *parser) jsxStringsToMemberExpression(loc logger.Loc, parts []string) js_ast.Expr {
		js_parser.go#L9252: func (p *parser) checkForNonBMPCodePoint(loc logger.Loc, name string) {
		js_parser.go#L9267: func (p *parser) warnAboutTypeofAndString(a js_ast.Expr, b js_ast.Expr) {
		js_parser.go#L9308: func (p *parser) warnAboutEqualityCheck(op string, value js_ast.Expr, afterOpLoc logger.Loc) bool {
		js_parser.go#L9360: func (p *parser) warnAboutLackOfDefine(name string, r logger.Range) {
		js_parser.go#L9376: func (p *parser) maybeRewritePropertyAccess(
		js_parser.go#L9523: func (p *parser) simplifyBooleanExpr(expr js_ast.Expr) js_ast.Expr {
		js_parser.go#L9672: func (p *parser) visitExpr(expr js_ast.Expr) js_ast.Expr {
		js_parser.go#L9677: func (p *parser) valueForThis(loc logger.Loc) (js_ast.Expr, bool) {
		js_parser.go#L9771: func (p *parser) isValidAssignmentTarget(expr js_ast.Expr) bool {
		js_parser.go#L9796: func (p *parser) mangleTemplate(loc logger.Loc, e *js_ast.ETemplate) js_ast.Expr {
		js_parser.go#L9828: func (p *parser) visitExprInOut(expr js_ast.Expr, in exprIn) (js_ast.Expr, exprOut) {
		js_parser.go#L11484: func (p *parser) warnAboutImportNamespaceCallOrConstruct(target js_ast.Expr, isConstruct bool) {
		js_parser.go#L11523: func (p *parser) valueForDefine(loc logger.Loc, assignTarget js_ast.AssignTarget, isDeleteTarget bool, defineFunc config.DefineFunc) js_ast.Expr {
		js_parser.go#L11545: func (p *parser) handleIdentifier(loc logger.Loc, e *js_ast.EIdentifier, opts identifierOpts) js_ast.Expr {
		js_parser.go#L11630: func (p *parser) visitFn(fn *js_ast.Fn, scopeLoc logger.Loc) {
		js_parser.go#L11664: func (p *parser) recordExport(loc logger.Loc, alias string, ref js_ast.Ref) {
		js_parser.go#L11676: func (p *parser) recordExportedBinding(binding js_ast.Binding) {
		js_parser.go#L11703: func (p *parser) scanForImportsAndExports(stmts []js_ast.Stmt) (result scanForImportsAndExportsResult) {
		js_parser.go#L12094: func (p *parser) appendPart(parts []js_ast.Part, stmts []js_ast.Stmt) []js_ast.Part {
		js_parser.go#L12140: func (p *parser) stmtsCanBeRemovedIfUnused(stmts []js_ast.Stmt) bool {
		js_parser.go#L12213: func (p *parser) classCanBeRemovedIfUnused(class js_ast.Class) bool {
		js_parser.go#L12233: func (p *parser) bindingCanBeRemovedIfUnused(binding js_ast.Binding) bool {
		js_parser.go#L12262: func (p *parser) exprCanBeRemovedIfUnused(expr js_ast.Expr) bool {
		js_parser.go#L12391: func (p *parser) simplifyUnusedExpr(expr js_ast.Expr) js_ast.Expr {
		js_parser.go#L12622: func newParser(log logger.Log, source logger.Source, lexer js_lexer.Lexer, options *Options) *parser {
		js_parser.go#L12628: 	p := &parser{
		js_parser.go#L12851: func (p *parser) validateJSX(span js_ast.Span, name string) []string {
		js_parser.go#L12865: func (p *parser) prepareForVisitPass() {
		js_parser.go#L12912: func (p *parser) declareCommonJSSymbol(kind js_ast.SymbolKind, name string) js_ast.Ref {
		js_parser.go#L12961: func (p *parser) computeCharacterFrequency() *js_ast.CharFreq {
		js_parser.go#L12999: func (p *parser) generateImportStmt(
		js_parser.go#L13039: func (p *parser) toAST(source logger.Source, parts []js_ast.Part, hashbang string, directive string) js_ast.AST {
		js_parser_lower.go#L17: func (p *parser) markSyntaxFeature(feature compat.JSFeature, r logger.Range) (didGenerateError bool) {
		js_parser_lower.go#L120: func (p *parser) isStrictMode() bool {
		js_parser_lower.go#L124: func (p *parser) isStrictModeOutputFormat() bool {
		js_parser_lower.go#L141: func (p *parser) markStrictModeFeature(feature strictModeFeature, r logger.Range, detail string) {
		js_parser_lower.go#L196: func (p *parser) markLoweredSyntaxFeature(feature compat.JSFeature, r logger.Range, loweredFeature compat.JSFeature) {
		js_parser_lower.go#L202: func (p *parser) isPrivateUnsupported(private *js_ast.EPrivateIdentifier) bool {
		js_parser_lower.go#L206: func (p *parser) captureThis() js_ast.Ref {
		js_parser_lower.go#L214: func (p *parser) captureArguments() js_ast.Ref {
		js_parser_lower.go#L222: func (p *parser) lowerFunction(
		js_parser_lower.go#L451: func (p *parser) lowerOptionalChain(expr js_ast.Expr, in exprIn, childOut exprOut) (js_ast.Expr, exprOut) {
		js_parser_lower.go#L741: func (p *parser) lowerAssignmentOperator(value js_ast.Expr, callback func(js_ast.Expr, js_ast.Expr) js_ast.Expr) js_ast.Expr {
		js_parser_lower.go#L789: func (p *parser) lowerExponentiationAssignmentOperator(loc logger.Loc, e *js_ast.EBinary) js_ast.Expr {
		js_parser_lower.go#L806: func (p *parser) lowerNullishCoalescingAssignmentOperator(loc logger.Loc, e *js_ast.EBinary) js_ast.Expr {
		js_parser_lower.go#L840: func (p *parser) lowerLogicalAssignmentOperator(loc logger.Loc, e *js_ast.EBinary, op js_ast.OpCode) js_ast.Expr {
		js_parser_lower.go#L863: func (p *parser) lowerNullishCoalescing(loc logger.Loc, left js_ast.Expr, right js_ast.Expr) js_ast.Expr {
		js_parser_lower.go#L902: func (p *parser) lowerObjectSpread(loc logger.Loc, e *js_ast.EObject) js_ast.Expr {
		js_parser_lower.go#L960: func (p *parser) lowerPrivateGet(target js_ast.Expr, loc logger.Loc, private *js_ast.EPrivateIdentifier) js_ast.Expr {
		js_parser_lower.go#L992: func (p *parser) lowerPrivateSet(
		js_parser_lower.go#L1021: func (p *parser) lowerPrivateSetUnOp(target js_ast.Expr, loc logger.Loc, private *js_ast.EPrivateIdentifier, op js_ast.OpCode, isSuffix bool) js_ast.Expr {
		js_parser_lower.go#L1052: func (p *parser) lowerPrivateSetBinOp(target js_ast.Expr, loc logger.Loc, private *js_ast.EPrivateIdentifier, op js_ast.OpCode, value js_ast.Expr) js_ast.Expr {
		js_parser_lower.go#L1064: func (p *parser) extractPrivateIndex(target js_ast.Expr) (js_ast.Expr, logger.Loc, *js_ast.EPrivateIdentifier) {
		js_parser_lower.go#L1113: func (p *parser) lowerObjectRestInDecls(decls []js_ast.Decl) []js_ast.Decl {
		js_parser_lower.go#L1141: func (p *parser) lowerObjectRestInForLoopInit(init js_ast.Stmt, body *js_ast.Stmt) {
		js_parser_lower.go#L1185: func (p *parser) lowerObjectRestInCatchBinding(catch *js_ast.Catch) {
		js_parser_lower.go#L1202: func (p *parser) lowerObjectRestInAssign(rootExpr js_ast.Expr, rootInit js_ast.Expr) (js_ast.Expr, bool) {
		js_parser_lower.go#L1216: func (p *parser) lowerObjectRestToDecls(rootExpr js_ast.Expr, rootInit js_ast.Expr, decls []js_ast.Decl) ([]js_ast.Decl, bool) {
		js_parser_lower.go#L1232: func (p *parser) lowerObjectRestHelper(
		js_parser_lower.go#L1483: func (p *parser) captureKeyForObjectRest(originalKey js_ast.Expr) (finalKey js_ast.Expr, capturedKey func() js_ast.Expr) {
		js_parser_lower.go#L1527: func (p *parser) lowerClass(stmt js_ast.Stmt, expr js_ast.Expr, shadowRef js_ast.Ref) ([]js_ast.Stmt, js_ast.Expr) {
		js_parser_lower.go#L2267: func (p *parser) shouldLowerSuperPropertyAccess(expr js_ast.Expr) bool {
		js_parser_lower.go#L2275: func (p *parser) lowerSuperPropertyAccess(loc logger.Loc, key js_ast.Expr) js_ast.Expr {
		js_parser_lower.go#L2287: func (p *parser) maybeLowerSuperPropertyAccessInsideCall(call *js_ast.ECall) {
		ts_parser.go#L13: func (p *parser) skipTypeScriptBinding() {
		ts_parser.go#L82: func (p *parser) skipTypeScriptFnArgs() {
		ts_parser.go#L129: func (p *parser) skipTypeScriptParenOrFnType() {
		ts_parser.go#L139: func (p *parser) skipTypeScriptReturnType() {
		ts_parser.go#L162: func (p *parser) skipTypeScriptType(level js_ast.L) {
		ts_parser.go#L167: func (p *parser) skipTypeScriptTypePrefix() {
		ts_parser.go#L299: func (p *parser) skipTypeScriptTypeSuffix(level js_ast.L) {
		ts_parser.go#L381: func (p *parser) skipTypeScriptObjectType() {
		ts_parser.go#L481: func (p *parser) skipTypeScriptTypeParameters() {
		ts_parser.go#L513: func (p *parser) skipTypeScriptTypeArguments(isInsideJSXElement bool) bool {
		ts_parser.go#L533: func (p *parser) trySkipTypeScriptTypeArgumentsWithBacktracking() bool {
		ts_parser.go#L560: func (p *parser) trySkipTypeScriptTypeParametersThenOpenParenWithBacktracking() bool {
		ts_parser.go#L585: func (p *parser) trySkipTypeScriptArrowReturnTypeWithBacktracking() bool {
		ts_parser.go#L613: func (p *parser) trySkipTypeScriptArrowArgsWithBacktracking() bool {
		ts_parser.go#L638: func (p *parser) canFollowTypeArgumentsInExpression() bool {
		ts_parser.go#L686: func (p *parser) skipTypeScriptInterfaceStmt(opts parseStmtOpts) {
		ts_parser.go#L721: func (p *parser) skipTypeScriptTypeStmt(opts parseStmtOpts) {
		ts_parser.go#L747: func (p *parser) parseTypeScriptDecorators() []js_ast.Expr {
		ts_parser.go#L767: func (p *parser) parseTypeScriptEnumStmt(loc logger.Loc, opts parseStmtOpts) js_ast.Stmt {
		ts_parser.go#L833: func (p *parser) parseTypeScriptImportEqualsStmt(loc logger.Loc, opts parseStmtOpts, defaultNameLoc logger.Loc, defaultName string) js_ast.Stmt {
		ts_parser.go#L880: func (p *parser) parseTypeScriptNamespaceStmt(loc logger.Loc, opts parseStmtOpts) js_ast.Stmt {
		ts_parser.go#L974: func (p *parser) generateClosureForTypeScriptNamespaceOrEnum(