package js_parser
import "github.com/evanw/esbuild/internal/js_parser"
Index ¶
- func GlobResolveAST(log logger.Log, source logger.Source, importRecords []ast.ImportRecord, object *js_ast.EObject, name string) js_ast.AST
- func LazyExportAST(log logger.Log, source logger.Source, options Options, expr js_ast.Expr, apiCall string) js_ast.AST
- func Parse(log logger.Log, source logger.Source, options Options) (result js_ast.AST, ok bool)
- func ParseDefineExpr(text string) (config.DefineExpr, js_ast.E)
- func ParseGlobalName(log logger.Log, source logger.Source) (result []string, ok bool)
- func ParseJSON(log logger.Log, source logger.Source, options JSONOptions) (result js_ast.Expr, ok bool)
- func ParseSourceMap(log logger.Log, source logger.Source) *sourcemap.SourceMap
- type JSONOptions
- type JSXImport
- type Options
Functions ¶
func GlobResolveAST ¶
func GlobResolveAST(log logger.Log, source logger.Source, importRecords []ast.ImportRecord, object *js_ast.EObject, name string) js_ast.AST
func LazyExportAST ¶
func LazyExportAST(log logger.Log, source logger.Source, options Options, expr js_ast.Expr, apiCall string) js_ast.AST
func Parse ¶
func ParseDefineExpr ¶
func ParseDefineExpr(text string) (config.DefineExpr, js_ast.E)
func ParseGlobalName ¶
func ParseJSON ¶
func ParseJSON(log logger.Log, source logger.Source, options JSONOptions) (result js_ast.Expr, ok bool)
func ParseSourceMap ¶
Specification: https://sourcemaps.info/spec.html
Types ¶
type JSONOptions ¶
type JSONOptions struct { UnsupportedJSFeatures compat.JSFeature Flavor js_lexer.JSONFlavor ErrorSuffix string IsForDefine bool }
type JSXImport ¶
type JSXImport uint8
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
This is used as part of an incremental build cache key. Some of these values can potentially change between builds if they are derived from nearby "package.json" or "tsconfig.json" files that were changed since the last build.
func OptionsForYarnPnP ¶
func OptionsForYarnPnP() Options
func OptionsFromConfig ¶
func (*Options) Equal ¶
Source Files ¶
global_name_parser.go js_parser.go js_parser_lower.go js_parser_lower_class.go json_parser.go sourcemap_parser.go ts_parser.go
- Version
- v0.25.0 (latest)
- Published
- Feb 8, 2025
- Platform
- linux/amd64
- Imports
- 18 packages
- Last checked
- 4 days ago –
Tools for package owners.