package js_parser

import "github.com/evanw/esbuild/internal/js_parser"

Index

Functions

func LazyExportAST

func LazyExportAST(log logger.Log, source logger.Source, options Options, expr js_ast.Expr, apiCall string) js_ast.AST

func Parse

func Parse(log logger.Log, source logger.Source, options Options) (result js_ast.AST, ok bool)

func ParseGlobalName

func ParseGlobalName(log logger.Log, source logger.Source) (result []string, ok bool)

func ParseJSON

func ParseJSON(log logger.Log, source logger.Source, options JSONOptions) (result js_ast.Expr, ok bool)

func ParseJSXExpr

func ParseJSXExpr(text string, kind JSXExprKind) (config.JSXExpr, bool)

func ParseSourceMap

func ParseSourceMap(log logger.Log, source logger.Source) *sourcemap.SourceMap

Specification: https://sourcemaps.info/spec.html

Types

type JSONOptions

type JSONOptions struct {
	AllowComments       bool
	AllowTrailingCommas bool
}

type JSXExprKind

type JSXExprKind uint8
const (
	JSXFactory JSXExprKind = iota
	JSXFragment
)

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 OptionsFromConfig

func OptionsFromConfig(options *config.Options) Options

func (*Options) Equal

func (a *Options) Equal(b *Options) bool

Source Files

global_name_parser.go js_parser.go js_parser_lower.go json_parser.go sourcemap_parser.go ts_parser.go

Version
v0.14.36
Published
Apr 12, 2022
Platform
windows/amd64
Imports
16 packages
Last checked
7 hours ago

Tools for package owners.