js_parser

package
v0.13.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 added in v0.8.0

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 added in v0.11.17

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 added in v0.8.12

type JSONOptions struct {
	AllowComments       bool
	AllowTrailingCommas bool
}

type JSXExprKind added in v0.11.17

type JSXExprKind uint8
const (
	JSXFactory JSXExprKind = iota
	JSXFragment
)

type Options added in v0.8.12

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 added in v0.8.12

func OptionsFromConfig(options *config.Options) Options

func (*Options) Equal added in v0.8.12

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL