estree

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayExpression

type ArrayExpression struct {
	Type     string       `json:"type"`
	Start    int          `json:"start"`
	End      int          `json:"end"`
	Loc      *SrcLoc      `json:"loc"`
	Elements []Expression `json:"elements"`
}

https://github.com/estree/estree/blob/master/es5.md#arrayexpression

type ArrayPattern

type ArrayPattern struct {
	Type     string  `json:"type"`
	Start    int     `json:"start"`
	End      int     `json:"end"`
	Loc      *SrcLoc `json:"loc"`
	Elements []Node  `json:"elements"`
}

https://github.com/estree/estree/blob/master/es2015.md#arraypattern

type ArrowFunctionExpression

type ArrowFunctionExpression struct {
	Type       string      `json:"type"`
	Start      int         `json:"start"`
	End        int         `json:"end"`
	Loc        *SrcLoc     `json:"loc"`
	Id         *Identifier `json:"id"`
	Params     []Node      `json:"params"`
	Body       Node        `json:"body"`
	Generator  bool        `json:"generator"`
	Async      bool        `json:"async"`
	Expression bool        `json:"expression"`
}

https://github.com/estree/estree/blob/master/es2015.md#arrowfunctionexpression

type AssignmentExpression

type AssignmentExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Operator string     `json:"operator"`
	Left     Node       `json:"left"`
	Right    Expression `json:"right"`
}

https://github.com/estree/estree/blob/master/es5.md#assignmentexpression

type AssignmentPattern

type AssignmentPattern struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Left  Node    `json:"left"`
	Right Node    `json:"right"`
}

https://github.com/estree/estree/blob/master/es2015.md#assignmentpattern

type AssignmentProperty

type AssignmentProperty struct {
	Type      string     `json:"type"`
	Start     int        `json:"start"`
	End       int        `json:"end"`
	Loc       *SrcLoc    `json:"loc"`
	Key       Expression `json:"key"`
	Method    bool       `json:"method"`
	Shorthand bool       `json:"shorthand"`
	Computed  bool       `json:"computed"`
	Value     Pattern    `json:"value"`
	Kind      string     `json:"kind"`
}

https://github.com/estree/estree/blob/master/es2015.md#objectpattern

type AwaitExpression

type AwaitExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
}

https://github.com/estree/estree/blob/master/es2017.md#awaitexpression

type BigIntLiteral

type BigIntLiteral struct {
	Type   string      `json:"type"`
	Start  int         `json:"start"`
	End    int         `json:"end"`
	Loc    *SrcLoc     `json:"loc"`
	Value  interface{} `json:"value"` // string | boolean | null | number | RegExp | bigint(es2020)
	Raw    string      `json:"raw"`
	Bigint string      `json:"bigint"`
}

https://github.com/estree/estree/blob/master/es2020.md#bigintliteral

type BinaryExpression

type BinaryExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Operator string     `json:"operator"`
	Left     Expression `json:"left"`
	Right    Expression `json:"right"`
}

https://github.com/estree/estree/blob/master/es5.md#binaryexpression

type BlockStatement

type BlockStatement struct {
	Type  string      `json:"type"`
	Start int         `json:"start"`
	End   int         `json:"end"`
	Loc   *SrcLoc     `json:"loc"`
	Body  []Statement `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#blockstatement

type BreakStatement

type BreakStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Label Expression `json:"label"`
}

https://github.com/estree/estree/blob/master/es5.md#breakstatement

type CallExpression

type CallExpression struct {
	Type      string       `json:"type"`
	Start     int          `json:"start"`
	End       int          `json:"end"`
	Loc       *SrcLoc      `json:"loc"`
	Callee    Expression   `json:"callee"`
	Arguments []Expression `json:"arguments"`
	Optional  bool         `json:"optional"`
}

https://github.com/estree/estree/blob/master/es5.md#callexpression

type CatchClause

type CatchClause struct {
	Type  string    `json:"type"`
	Start int       `json:"start"`
	End   int       `json:"end"`
	Loc   *SrcLoc   `json:"loc"`
	Param Pattern   `json:"param"` // `Pattern | null` from es2019
	Body  Statement `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#catchclause

type ChainExpression

type ChainExpression struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Expression Expression `json:"expression"` // CallExpression | MemberExpression
}

https://github.com/estree/estree/blob/master/es2020.md#chainexpression

type ClassBody

type ClassBody struct {
	Type  string       `json:"type"`
	Start int          `json:"start"`
	End   int          `json:"end"`
	Loc   *SrcLoc      `json:"loc"`
	Body  []Expression `json:"body"` // MethodDefinition | PropertyDefinition | StaticBlock
}

https://github.com/estree/estree/blob/master/es2015.md#classbody

type ClassDeclaration

type ClassDeclaration struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Id         Expression `json:"id"`
	SuperClass Expression `json:"superClass"`
	Body       Expression `json:"body"`
	Abstract   bool       `json:"abstract"`
	Declare    bool       `json:"declare"`
	Decorators []Node     `json:"decorators"`
}

https://github.com/estree/estree/blob/master/es2015.md#classdeclaration

type ClassExpression

type ClassExpression struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Id         Expression `json:"id"`
	SuperClass Expression `json:"superClass"`
	Body       Expression `json:"body"`
	Abstract   bool       `json:"abstract"`
}

https://github.com/estree/estree/blob/master/es2015.md#classexpression

type ConditionalExpression

type ConditionalExpression struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Test       Expression `json:"test"`
	Consequent Expression `json:"consequent"`
	Alternate  Expression `json:"alternate"`
}

https://github.com/estree/estree/blob/master/es5.md#conditionalexpression

type ContinueStatement

type ContinueStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Label Expression `json:"label"`
}

https://github.com/estree/estree/blob/master/es5.md#continuestatement

type ConvertCtx

type ConvertCtx struct {
	Parser  *parser.Parser
	Scope   *ConvertScope
	LineCol bool
}

func NewConvertCtx

func NewConvertCtx(p *parser.Parser) *ConvertCtx

type ConvertScope

type ConvertScope struct {
	Up   *ConvertScope
	Flag ConvertScopeFlag
}

type ConvertScopeFlag

type ConvertScopeFlag uint64
const (
	CSF_NONE      ConvertScopeFlag = 0
	CSF_INTERFACE ConvertScopeFlag = 1 << iota
)

func (ConvertScopeFlag) Off

func (ConvertScopeFlag) On

type DebuggerStatement

type DebuggerStatement struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type Declaration

type Declaration interface{}

type Decorator

type Decorator struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Expression Expression `json:"expression"`
}

type Directive

type Directive struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Expression Expression `json:"expression"`
	Directive  string     `json:"directive"`
}

https://github.com/estree/estree/blob/master/es5.md#directive

type DoWhileStatement

type DoWhileStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Test  Expression `json:"test"`
	Body  Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#dowhilestatement

type EmptyStatement

type EmptyStatement struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type ExportAllDeclaration

type ExportAllDeclaration struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Exported Expression `json:"exported"`
	Source   Expression `json:"source"`
}

https://github.com/estree/estree/blob/master/es2015.md#exportalldeclaration

type ExportDefaultDeclaration

type ExportDefaultDeclaration struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`

	// AnonymousDefaultExportedFunctionDeclaration | FunctionDeclaration | AnonymousDefaultExportedClassDeclaration | ClassDeclaration | Expression
	Declaration Node `json:"declaration"`
}

type ExportNamedDeclaration

type ExportNamedDeclaration struct {
	Type        string      `json:"type"`
	Start       int         `json:"start"`
	End         int         `json:"end"`
	Loc         *SrcLoc     `json:"loc"`
	Declaration Declaration `json:"declaration"` // Declaration | null
	Specifiers  []Node      `json:"specifiers"`
	Source      Expression  `json:"source"` // Literal | null
	ExportKind  string      `json:"exportKind"`
}

https://github.com/estree/estree/blob/master/es2015.md#exportnameddeclaration

type ExportSpecifier

type ExportSpecifier struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Local      Expression `json:"local"`
	Exported   Expression `json:"exported"`
	ExportKind string     `json:"exportKind"`
}

https://github.com/estree/estree/blob/master/es2015.md#exportspecifier

type Expression

type Expression interface{}

type ExpressionStatement

type ExpressionStatement struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Expression Expression `json:"expression"`
}

https://github.com/estree/estree/blob/master/es5.md#expressionstatement

type ForInStatement

type ForInStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Left  Node       `json:"left"`
	Right Expression `json:"right"`
	Body  Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#forinstatement

type ForOfStatement

type ForOfStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Left  Node       `json:"left"`
	Right Expression `json:"right"`
	Body  Statement  `json:"body"`
	Await bool       `json:"await"`
}

https://github.com/estree/estree/blob/master/es2015.md#forofstatement

type ForStatement

type ForStatement struct {
	Type   string     `json:"type"`
	Start  int        `json:"start"`
	End    int        `json:"end"`
	Loc    *SrcLoc    `json:"loc"`
	Init   Node       `json:"init"` // VariableDeclaration | Expression | null
	Test   Expression `json:"test"`
	Update Expression `json:"update"`
	Body   Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#forstatement

type FunctionDeclaration

type FunctionDeclaration struct {
	Type      string  `json:"type"`
	Start     int     `json:"start"`
	End       int     `json:"end"`
	Loc       *SrcLoc `json:"loc"`
	Id        Node    `json:"id"`
	Params    []Node  `json:"params"`
	Body      Node    `json:"body"`
	Generator bool    `json:"generator"`
	Async     bool    `json:"async"`
}

https://github.com/estree/estree/blob/master/es5.md#functiondeclaration

type FunctionExpression

type FunctionExpression struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Id         Node    `json:"id"`
	Params     []Node  `json:"params"`
	Body       Node    `json:"body"`
	Generator  bool    `json:"generator"`
	Async      bool    `json:"async"`
	Expression bool    `json:"expression"`
}

https://github.com/estree/estree/blob/master/es5.md#functionexpression

type Identifier

type Identifier struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Name  string  `json:"name"`
}

https://github.com/estree/estree/blob/master/es5.md#identifier

type IfStatement

type IfStatement struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Test       Expression `json:"test"`
	Consequent Statement  `json:"consequent"`
	Alternate  Statement  `json:"alternate"`
}

https://github.com/estree/estree/blob/master/es5.md#ifstatement

type ImportDeclaration

type ImportDeclaration struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Specifiers []Node     `json:"specifiers"` // [ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier ]
	Source     Expression `json:"source"`
	ImportKind string     `json:"importKind"`
}

https://github.com/estree/estree/blob/master/es2015.md#importdeclaration

type ImportDefaultSpecifier

type ImportDefaultSpecifier struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Local Node    `json:"local"`
}

https://github.com/estree/estree/blob/master/es2015.md#importdefaultspecifier

type ImportExpression

type ImportExpression struct {
	Type   string     `json:"type"`
	Start  int        `json:"start"`
	End    int        `json:"end"`
	Loc    *SrcLoc    `json:"loc"`
	Source Expression `json:"source"`
}

https://github.com/estree/estree/blob/master/es2020.md#importexpression

type ImportNamespaceSpecifier

type ImportNamespaceSpecifier struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Local Node    `json:"local"`
}

https://github.com/estree/estree/blob/master/es2015.md#importnamespacespecifier

type ImportSpecifier

type ImportSpecifier struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Local      Node    `json:"local"`
	Imported   Node    `json:"imported"`
	ImportKind string  `json:"importKind"`
}

https://github.com/estree/estree/blob/master/es2015.md#importspecifier

type JSXAttribute

type JSXAttribute struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Name  Node    `json:"name"`
	Value Node    `json:"value"`
}

type JSXClosingElement

type JSXClosingElement struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Name  Node    `json:"name"`
}

type JSXClosingFragment

type JSXClosingFragment struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type JSXElement

type JSXElement struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	OpeningElement Node    `json:"openingElement"`
	Children       []Node  `json:"children"`
	ClosingElement Node    `json:"closingElement"`
}

type JSXEmptyExpression

type JSXEmptyExpression struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type JSXExpressionContainer

type JSXExpressionContainer struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Expression Node    `json:"expression"`
}

type JSXFragment

type JSXFragment struct {
	Type            string  `json:"type"`
	Start           int     `json:"start"`
	End             int     `json:"end"`
	Loc             *SrcLoc `json:"loc"`
	OpeningFragment Node    `json:"openingFragment"`
	Children        []Node  `json:"children"`
	ClosingFragment Node    `json:"closingFragment"`
}

type JSXIdentifier

type JSXIdentifier struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Name  string  `json:"name"`
}

type JSXMemberExpression

type JSXMemberExpression struct {
	Type     string  `json:"type"`
	Start    int     `json:"start"`
	End      int     `json:"end"`
	Loc      *SrcLoc `json:"loc"`
	Object   Node    `json:"object"`
	Property Node    `json:"property"`
}

type JSXNamespacedName

type JSXNamespacedName struct {
	Type      string  `json:"type"`
	Start     int     `json:"start"`
	End       int     `json:"end"`
	Loc       *SrcLoc `json:"loc"`
	Namespace string  `json:"namespace"`
	Name      string  `json:"name"`
}

type JSXOpeningElement

type JSXOpeningElement struct {
	Type        string  `json:"type"`
	Start       int     `json:"start"`
	End         int     `json:"end"`
	Loc         *SrcLoc `json:"loc"`
	Name        Node    `json:"name"`
	Attributes  []Node  `json:"attributes"`
	SelfClosing bool    `json:"selfClosing"`
}

type JSXOpeningFragment

type JSXOpeningFragment struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type JSXSpreadAttribute

type JSXSpreadAttribute struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
}

type JSXSpreadChild

type JSXSpreadChild struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Expression Node    `json:"expression"`
}

type JSXText

type JSXText struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Value string  `json:"value"`
	Raw   string  `json:"raw"`
}

type LabeledStatement

type LabeledStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Label Expression `json:"label"`
	Body  Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#labeledstatement

type Literal

type Literal struct {
	Type  string      `json:"type"`
	Start int         `json:"start"`
	End   int         `json:"end"`
	Loc   *SrcLoc     `json:"loc"`
	Value interface{} `json:"value"` // string | boolean | null | number | RegExp | bigint(es2020)
	Raw   string      `json:"raw"`
}

https://github.com/estree/estree/blob/master/es5.md#literal

type LogicalExpression

type LogicalExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Operator string     `json:"operator"`
	Left     Expression `json:"left"`
	Right    Expression `json:"right"`
}

https://github.com/estree/estree/blob/master/es5.md#logicalexpression

type MemberExpression

type MemberExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Object   Expression `json:"object"`
	Property Expression `json:"property"`
	Computed bool       `json:"computed"`
	Optional bool       `json:"optional"`
}

https://github.com/estree/estree/blob/master/es5.md#memberexpression

type MetaProperty

type MetaProperty struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Meta     Expression `json:"meta"`
	Property Expression `json:"property"`
}

https://github.com/estree/estree/blob/master/es2015.md#metaproperty

type MethodDefinition

type MethodDefinition struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Key        Expression `json:"key"`
	Value      Expression `json:"value"`
	Kind       string     `json:"kind"` // "constructor" | "method" | "get" | "set"
	Computed   bool       `json:"computed"`
	Static     bool       `json:"static"`
	Decorators []Node     `json:"decorators"`
}

https://github.com/estree/estree/blob/master/es2015.md#methoddefinition

type ModuleDeclaration

type ModuleDeclaration interface{}

type NewExpression

type NewExpression struct {
	Type      string       `json:"type"`
	Start     int          `json:"start"`
	End       int          `json:"end"`
	Loc       *SrcLoc      `json:"loc"`
	Callee    Expression   `json:"callee"`
	Arguments []Expression `json:"arguments"`
}

https://github.com/estree/estree/blob/master/es5.md#newexpression

type Node

type Node interface{}

func Convert

func Convert(node parser.Node, ctx *ConvertCtx) Node

func ConvertTsTyp

func ConvertTsTyp(node parser.Node, ctx *ConvertCtx) Node

type ObjectExpression

type ObjectExpression struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Properties []Node  `json:"properties"` // Property | SpreadElement
}

https://github.com/estree/estree/blob/master/es5.md#objectexpression

type ObjectPattern

type ObjectPattern struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Properties []Node  `json:"properties"`
}

https://github.com/estree/estree/blob/master/es2015.md#objectpattern

type Position

type Position struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type PrivateIdentifier

type PrivateIdentifier struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Name  string  `json:"name"`
}

https://github.com/estree/estree/blob/master/es2022.md#privateidentifier

type Program

type Program struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	SourceType string  `json:"sourceType"` // "script" | "module"
	Body       []Node  `json:"body"`       // [ Directive | Statement ]
}

https://github.com/estree/estree/blob/master/es5.md#programs

func ConvertProg

func ConvertProg(n *parser.Prog, ctx *ConvertCtx) *Program

type Property

type Property struct {
	Type      string     `json:"type"`
	Start     int        `json:"start"`
	End       int        `json:"end"`
	Loc       *SrcLoc    `json:"loc"`
	Key       Expression `json:"key"`
	Value     Expression `json:"value"`
	Kind      string     `json:"kind"`
	Method    bool       `json:"method"`
	Shorthand bool       `json:"shorthand"`
	Computed  bool       `json:"computed"`
}

https://github.com/estree/estree/blob/master/es2015.md#expressions

type PropertyDefinition

type PropertyDefinition struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Key        Expression `json:"key"`
	Value      Expression `json:"value"`
	Computed   bool       `json:"computed"`
	Static     bool       `json:"static"`
	Decorators []Node     `json:"decorators"`
}

https://github.com/estree/estree/blob/master/es2022.md#propertydefinition

type RegExpLiteral

type RegExpLiteral struct {
	Type   string      `json:"type"`
	Start  int         `json:"start"`
	End    int         `json:"end"`
	Loc    *SrcLoc     `json:"loc"`
	Value  interface{} `json:"value"`
	Regexp *Regexp     `json:"regexp"`
}

https://github.com/estree/estree/blob/master/es5.md#regexpliteral

type Regexp

type Regexp struct {
	Pattern string `json:"pattern"`
	Flags   string `json:"flags"`
}

type RestElement

type RestElement struct {
	Type     string  `json:"type"`
	Start    int     `json:"start"`
	End      int     `json:"end"`
	Loc      *SrcLoc `json:"loc"`
	Argument Pattern `json:"argument"`
}

https://github.com/estree/estree/blob/master/es2015.md#restelement

type ReturnStatement

type ReturnStatement struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
}

https://github.com/estree/estree/blob/master/es5.md#returnstatement

type SequenceExpression

type SequenceExpression struct {
	Type        string       `json:"type"`
	Start       int          `json:"start"`
	End         int          `json:"end"`
	Loc         *SrcLoc      `json:"loc"`
	Expressions []Expression `json:"expressions"`
}

https://github.com/estree/estree/blob/master/es5.md#sequenceexpression

type SpreadElement

type SpreadElement struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
}

https://github.com/estree/estree/blob/master/es2015.md#expressions

type SrcLoc

type SrcLoc struct {
	Start Position `json:"start"`
	End   Position `json:"end"`
}

func CalcLoc added in v0.0.10

func CalcLoc(node parser.Node, s *span.Source, ctx *ConvertCtx) *SrcLoc

func FirstLoc added in v0.0.10

func FirstLoc(s *span.Source, ctx *ConvertCtx, locs ...span.Range) (span.Range, *SrcLoc)

func LastLoc added in v0.0.10

func LastLoc(s *span.Source, ctx *ConvertCtx, locs ...span.Range) (span.Range, *SrcLoc)

func TplLocWithTag added in v0.0.10

func TplLocWithTag(n *parser.TplExpr, s *span.Source, ctx *ConvertCtx) *SrcLoc

type Statement

type Statement interface{}

type StaticBlock

type StaticBlock struct {
	Type  string      `json:"type"`
	Start int         `json:"start"`
	End   int         `json:"end"`
	Loc   *SrcLoc     `json:"loc"`
	Body  []Statement `json:"body"`
}

https://github.com/estree/estree/blob/master/es2022.md#staticblock

type Super

type Super struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

https://github.com/estree/estree/blob/master/es2015.md#expressions

type SwitchCase

type SwitchCase struct {
	Type       string      `json:"type"`
	Start      int         `json:"start"`
	End        int         `json:"end"`
	Loc        *SrcLoc     `json:"loc"`
	Test       Expression  `json:"test"`
	Consequent []Statement `json:"consequent"`
}

https://github.com/estree/estree/blob/master/es5.md#switchcase

type SwitchStatement

type SwitchStatement struct {
	Type         string        `json:"type"`
	Start        int           `json:"start"`
	End          int           `json:"end"`
	Loc          *SrcLoc       `json:"loc"`
	Discriminant Expression    `json:"discriminant"`
	Cases        []*SwitchCase `json:"cases"`
}

https://github.com/estree/estree/blob/master/es5.md#switchstatement

type TSAnyKeyword

type TSAnyKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSArrayPattern

type TSArrayPattern struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Elements       []Node  `json:"elements"`
	Optional       bool    `json:"optional"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSArrayType

type TSArrayType struct {
	Type        string  `json:"type"`
	Start       int     `json:"start"`
	End         int     `json:"end"`
	Loc         *SrcLoc `json:"loc"`
	ElementType Node    `json:"elementType"`
}

type TSArrowFunctionExpression

type TSArrowFunctionExpression struct {
	Type           string      `json:"type"`
	Start          int         `json:"start"`
	End            int         `json:"end"`
	Loc            *SrcLoc     `json:"loc"`
	Id             *Identifier `json:"id"`
	Params         []Node      `json:"params"`
	Body           Node        `json:"body"`
	Generator      bool        `json:"generator"`
	Async          bool        `json:"async"`
	Expression     bool        `json:"expression"`
	TypeParameters Node        `json:"typeParameters"`
	ReturnType     Node        `json:"returnType"`
}

type TSAsExpression

type TSAsExpression struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Expression     Node    `json:"expression"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSBigIntKeyword

type TSBigIntKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSBooleanKeyword

type TSBooleanKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSCallExpression

type TSCallExpression struct {
	Type           string       `json:"type"`
	Start          int          `json:"start"`
	End            int          `json:"end"`
	Loc            *SrcLoc      `json:"loc"`
	Callee         Expression   `json:"callee"`
	Arguments      []Expression `json:"arguments"`
	Optional       bool         `json:"optional"`
	TypeParameters Node         `json:"typeParameters"`
}

type TSCallSignatureDeclaration

type TSCallSignatureDeclaration struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
}

type TSClassDeclaration

type TSClassDeclaration struct {
	Type                string     `json:"type"`
	Start               int        `json:"start"`
	End                 int        `json:"end"`
	Loc                 *SrcLoc    `json:"loc"`
	Id                  Expression `json:"id"`
	TypeParameters      Node       `json:"typeParameters"`
	SuperClass          Expression `json:"superClass"`
	SuperTypeParameters Node       `json:"superTypeParameters"`
	Implements          []Node     `json:"implements"`
	Body                Expression `json:"body"`
	Declare             bool       `json:"declare"`
	Decorators          []Node     `json:"decorators"`
	Abstract            bool       `json:"abstract"`
}

type TSClassExpression

type TSClassExpression struct {
	Type                string     `json:"type"`
	Start               int        `json:"start"`
	End                 int        `json:"end"`
	Loc                 *SrcLoc    `json:"loc"`
	Id                  Expression `json:"id"`
	TypeParameters      Node       `json:"typeParameters"`
	SuperClass          Expression `json:"superClass"`
	SuperTypeParameters Node       `json:"superTypeParameters"`
	Implements          []Node     `json:"implements"`
	Body                Expression `json:"body"`
	Decorators          []Node     `json:"decorators"`
	Abstract            bool       `json:"abstract"`
}

type TSConditionalType

type TSConditionalType struct {
	Type        string  `json:"type"`
	Start       int     `json:"start"`
	End         int     `json:"end"`
	Loc         *SrcLoc `json:"loc"`
	CheckType   Node    `json:"checkType"`
	ExtendsType Node    `json:"extendsType"`
	TrueType    Node    `json:"trueType"`
	FalseType   Node    `json:"falseType"`
}

type TSConstructSignatureDeclaration

type TSConstructSignatureDeclaration struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
	Abstract       bool    `json:"abstract"`
}

type TSConstructorType

type TSConstructorType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
	Abstract       bool    `json:"abstract"`
}

type TSDeclareFunction

type TSDeclareFunction struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Body           Node    `json:"body"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
}

type TSEnumDeclaration

type TSEnumDeclaration struct {
	Type    string     `json:"type"`
	Start   int        `json:"start"`
	End     int        `json:"end"`
	Loc     *SrcLoc    `json:"loc"`
	Id      Expression `json:"id"`
	Members []Node     `json:"members"`
	Const   bool       `json:"const"`
	Declare bool       `json:"declare"`
}

type TSEnumMember

type TSEnumMember struct {
	Type        string     `json:"type"`
	Start       int        `json:"start"`
	End         int        `json:"end"`
	Loc         *SrcLoc    `json:"loc"`
	Id          Expression `json:"id"`
	Initializer Node       `json:"initializer"`
}

type TSExportAssignment

type TSExportAssignment struct {
	Type       string     `json:"type"`
	Start      int        `json:"start"`
	End        int        `json:"end"`
	Loc        *SrcLoc    `json:"loc"`
	Expression Expression `json:"expression"`
}

type TSExpressionWithTypeArguments

type TSExpressionWithTypeArguments struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Expression     Node    `json:"expression"`
	TypeParameters Node    `json:"typeParameters"`
}

type TSExternalModuleReference

type TSExternalModuleReference struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Expression Node    `json:"expression"`
}

type TSFunctionDeclaration

type TSFunctionDeclaration struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Body           Node    `json:"body"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
}

type TSFunctionExpression

type TSFunctionExpression struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Body           Node    `json:"body"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	Expression     bool    `json:"expression"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
}

type TSFunctionType

type TSFunctionType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Id             Node    `json:"id"`
	Params         []Node  `json:"params"`
	Generator      bool    `json:"generator"`
	Async          bool    `json:"async"`
	TypeParameters Node    `json:"typeParameters"`
	ReturnType     Node    `json:"returnType"`
}

type TSIdentifier

type TSIdentifier struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Name           string  `json:"name"`
	Optional       bool    `json:"optional"`
	TypeAnnotation Node    `json:"typeAnnotation"`
	Decorators     []Node  `json:"decorators"`
}

type TSImportEqualsDeclaration

type TSImportEqualsDeclaration struct {
	Type            string  `json:"type"`
	Start           int     `json:"start"`
	End             int     `json:"end"`
	Loc             *SrcLoc `json:"loc"`
	Id              Node    `json:"id"`
	ModuleReference Node    `json:"moduleReference"`
	IsExport        bool    `json:"isExport"`
}

type TSImportType

type TSImportType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Argument       Node    `json:"argument"`
	Qualifier      Node    `json:"qualifier"`
	TypeParameters Node    `json:"typeParameters"`
}

type TSIndexSignature

type TSIndexSignature struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Static         bool    `json:"static"`
	Abstract       bool    `json:"abstract"`
	Optional       bool    `json:"optional"`
	Readonly       bool    `json:"readonly"`
	Declare        bool    `json:"declare"`
	Accessibility  string  `json:"accessibility"`
	Parameters     []Node  `json:"parameters"`
	TypeAnnotation Node    `json:"typeAnnotation"`
	Decorators     []Node  `json:"decorators"`
}

type TSIndexedAccessType

type TSIndexedAccessType struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	ObjectType Node    `json:"objectType"`
	IndexType  Node    `json:"indexType"`
}

type TSInferType

type TSInferType struct {
	Type          string  `json:"type"`
	Start         int     `json:"start"`
	End           int     `json:"end"`
	Loc           *SrcLoc `json:"loc"`
	TypeParameter Node    `json:"typeParameter"`
}

type TSInterfaceBody

type TSInterfaceBody struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Body  []Node  `json:"body"`
}

type TSInterfaceDeclaration

type TSInterfaceDeclaration struct {
	Type           string     `json:"type"`
	Start          int        `json:"start"`
	End            int        `json:"end"`
	Loc            *SrcLoc    `json:"loc"`
	Id             Expression `json:"id"`
	TypeParameters Node       `json:"typeParameters"`
	Extends        []Node     `json:"extends"`
	Body           Expression `json:"body"`
	Declare        bool       `json:"declare"`
}

type TSIntersectionType

type TSIntersectionType struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Types []Node  `json:"types"`
}

type TSIntrinsicKeyword

type TSIntrinsicKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSLiteralType

type TSLiteralType struct {
	Type    string  `json:"type"`
	Start   int     `json:"start"`
	End     int     `json:"end"`
	Loc     *SrcLoc `json:"loc"`
	Literal Node    `json:"literal"`
}

type TSMappedType

type TSMappedType struct {
	Type           string      `json:"type"`
	Start          int         `json:"start"`
	End            int         `json:"end"`
	Loc            *SrcLoc     `json:"loc"`
	Readonly       interface{} `json:"readonly"`
	Optional       interface{} `json:"optional"`
	TypeParameter  Node        `json:"typeParameter"`
	NameType       Node        `json:"nameType"`
	TypeAnnotation Node        `json:"typeAnnotation"`
}

type TSMethodDefinition

type TSMethodDefinition struct {
	Type          string     `json:"type"`
	Start         int        `json:"start"`
	End           int        `json:"end"`
	Loc           *SrcLoc    `json:"loc"`
	Key           Expression `json:"key"`
	Value         Expression `json:"value"`
	Kind          string     `json:"kind"` // "constructor" | "method" | "get" | "set"
	Computed      bool       `json:"computed"`
	Static        bool       `json:"static"`
	Optional      bool       `json:"optional"`
	Definite      bool       `json:"definite"`
	Override      bool       `json:"override"`
	Abstract      bool       `json:"abstract"`
	Readonly      bool       `json:"readonly"`
	Accessibility string     `json:"accessibility"`
	Decorators    []Node     `json:"decorators"`
}

type TSMethodSignature

type TSMethodSignature struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Key      Node       `json:"key"`
	Value    Expression `json:"value"`
	Computed bool       `json:"computed"`
	Optional bool       `json:"optional"`
	Kind     string     `json:"kind"`
}

type TSModuleDeclaration

type TSModuleDeclaration struct {
	Type    string     `json:"type"`
	Start   int        `json:"start"`
	End     int        `json:"end"`
	Loc     *SrcLoc    `json:"loc"`
	Id      Expression `json:"id"`
	Body    Node       `json:"body"`
	Declare bool       `json:"declare"`
	Global  bool       `json:"global"`
}

type TSNamedTupleMember

type TSNamedTupleMember struct {
	Type        string  `json:"type"`
	Start       int     `json:"start"`
	End         int     `json:"end"`
	Loc         *SrcLoc `json:"loc"`
	Optional    bool    `json:"optional"`
	Label       Node    `json:"label"`
	ElementType Node    `json:"elementType"`
}

type TSNamespaceExportDeclaration

type TSNamespaceExportDeclaration struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Id    Expression `json:"id"`
}

type TSNeverKeyword

type TSNeverKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSNewExpression

type TSNewExpression struct {
	Type           string       `json:"type"`
	Start          int          `json:"start"`
	End            int          `json:"end"`
	Loc            *SrcLoc      `json:"loc"`
	Callee         Expression   `json:"callee"`
	Arguments      []Expression `json:"arguments"`
	TypeParameters Node         `json:"typeParameters"`
}

type TSNonNullExpression

type TSNonNullExpression struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Expression Node    `json:"expression"`
}

type TSNullKeyword

type TSNullKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSNumberKeyword

type TSNumberKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSObjectKeyword

type TSObjectKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSObjectPattern

type TSObjectPattern struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Properties     []Node  `json:"properties"`
	Optional       bool    `json:"optional"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSOptionalType

type TSOptionalType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSParameterProperty

type TSParameterProperty struct {
	Type          string  `json:"type"`
	Start         int     `json:"start"`
	End           int     `json:"end"`
	Loc           *SrcLoc `json:"loc"`
	Parameter     Node    `json:"parameter"`
	Readonly      bool    `json:"readonly"`
	Accessibility string  `json:"accessibility"`
	Override      bool    `json:"override"`
	Decorators    []Node  `json:"decorators"`
}

represets the properties defined via constructor params

type TSParenthesizedType

type TSParenthesizedType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSPropertyDefinition

type TSPropertyDefinition struct {
	Type           string     `json:"type"`
	Start          int        `json:"start"`
	End            int        `json:"end"`
	Loc            *SrcLoc    `json:"loc"`
	Key            Expression `json:"key"`
	Value          Expression `json:"value"`
	Computed       bool       `json:"computed"`
	Static         bool       `json:"static"`
	Abstract       bool       `json:"abstract"`
	Optional       bool       `json:"optional"`
	Definite       bool       `json:"definite"`
	Readonly       bool       `json:"readonly"`
	Override       bool       `json:"override"`
	Declare        bool       `json:"declare"`
	Accessibility  string     `json:"accessibility"`
	TypeAnnotation Node       `json:"typeAnnotation"`
	Decorators     []Node     `json:"decorators"`
}

type TSPropertySignature

type TSPropertySignature struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Key            Node    `json:"key"`
	Computed       bool    `json:"computed"`
	Optional       bool    `json:"optional"`
	TypeAnnotation Node    `json:"typeAnnotation"`
	Kind           string  `json:"kind"`
	Readonly       bool    `json:"readonly"`
}

used as the member of `TSTypeLiteral`

type TSQualifiedName

type TSQualifiedName struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Left  Expression `json:"left"`
	Right Expression `json:"right"`
}

type TSRestElement

type TSRestElement struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Argument       Pattern `json:"argument"`
	Optional       bool    `json:"optional"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSRestType

type TSRestType struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSStringKeyword

type TSStringKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSSymbolKeyword

type TSSymbolKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSTaggedTemplateExpression

type TSTaggedTemplateExpression struct {
	Type           string     `json:"type"`
	Start          int        `json:"start"`
	End            int        `json:"end"`
	Loc            *SrcLoc    `json:"loc"`
	Tag            Expression `json:"tag"`
	Quasi          Expression `json:"quasi"`
	TypeParameters Node       `json:"typeParameters"`
}

type TSThisType

type TSThisType struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSTupleType

type TSTupleType struct {
	Type         string  `json:"type"`
	Start        int     `json:"start"`
	End          int     `json:"end"`
	Loc          *SrcLoc `json:"loc"`
	ElementTypes []Node  `json:"elementTypes"`
}

type TSTypeAliasDeclaration

type TSTypeAliasDeclaration struct {
	Type           string     `json:"type"`
	Start          int        `json:"start"`
	End            int        `json:"end"`
	Loc            *SrcLoc    `json:"loc"`
	Id             Expression `json:"id"`
	TypeParameters Node       `json:"typeParameters"`
	TypeAnnotation Node       `json:"typeAnnotation"`
	Declare        bool       `json:"declare"`
}

type TSTypeAnnotation

type TSTypeAnnotation struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSTypeAssertion

type TSTypeAssertion struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Expression     Node    `json:"expression"`
	TypeAnnotation Node    `json:"typeAnnotation"`
}

type TSTypeLiteral

type TSTypeLiteral struct {
	Type    string  `json:"type"`
	Start   int     `json:"start"`
	End     int     `json:"end"`
	Loc     *SrcLoc `json:"loc"`
	Members Node    `json:"members"`
}

type TSTypeOperator

type TSTypeOperator struct {
	Type           string      `json:"type"`
	Start          int         `json:"start"`
	End            int         `json:"end"`
	Loc            *SrcLoc     `json:"loc"`
	Operator       interface{} `json:"operator"`
	TypeAnnotation Node        `json:"typeAnnotation"`
}

type TSTypeParameter

type TSTypeParameter struct {
	Type       string  `json:"type"`
	Start      int     `json:"start"`
	End        int     `json:"end"`
	Loc        *SrcLoc `json:"loc"`
	Name       Node    `json:"name"`
	Constraint Node    `json:"constraint"`
	Default    Node    `json:"default"`
}

type TSTypeParameterDeclaration

type TSTypeParameterDeclaration struct {
	Type   string  `json:"type"`
	Start  int     `json:"start"`
	End    int     `json:"end"`
	Loc    *SrcLoc `json:"loc"`
	Params []Node  `json:"params"`
}

type TSTypeParameterInstantiation

type TSTypeParameterInstantiation struct {
	Type   string  `json:"type"`
	Start  int     `json:"start"`
	End    int     `json:"end"`
	Loc    *SrcLoc `json:"loc"`
	Params []Node  `json:"params"`
}

type TSTypePredicate

type TSTypePredicate struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	ParameterName  Node    `json:"parameterName"`
	TypeAnnotation Node    `json:"typeAnnotation"`
	Asserts        bool    `json:"asserts"`
}

type TSTypeQuery

type TSTypeQuery struct {
	Type     string  `json:"type"`
	Start    int     `json:"start"`
	End      int     `json:"end"`
	Loc      *SrcLoc `json:"loc"`
	ExprName Node    `json:"exprName"`
}

type TSTypeReference

type TSTypeReference struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	TypeName       Node    `json:"typeName"`
	TypeParameters Node    `json:"typeParameters"`
}

type TSUndefinedKeyword

type TSUndefinedKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSUnionType

type TSUnionType struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
	Types []Node  `json:"types"`
}

type TSUnknownKeyword

type TSUnknownKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSVariableDeclaration

type TSVariableDeclaration struct {
	Type         string                `json:"type"`
	Start        int                   `json:"start"`
	End          int                   `json:"end"`
	Loc          *SrcLoc               `json:"loc"`
	Kind         string                `json:"kind"`
	Declarations []*VariableDeclarator `json:"declarations"`
	Declare      bool                  `json:"declare"`
}

type TSVoidKeyword

type TSVoidKeyword struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type TSXOpeningElement

type TSXOpeningElement struct {
	Type           string  `json:"type"`
	Start          int     `json:"start"`
	End            int     `json:"end"`
	Loc            *SrcLoc `json:"loc"`
	Name           Node    `json:"name"`
	Attributes     []Node  `json:"attributes"`
	SelfClosing    bool    `json:"selfClosing"`
	TypeParameters Node    `json:"typeParameters"`
}

type TaggedTemplateExpression

type TaggedTemplateExpression struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Tag   Expression `json:"tag"`
	Quasi Expression `json:"quasi"`
}

https://github.com/estree/estree/blob/master/es2015.md#taggedtemplateexpression

type TemplateElement

type TemplateElement struct {
	Type  string                `json:"type"`
	Start int                   `json:"start"`
	End   int                   `json:"end"`
	Loc   *SrcLoc               `json:"loc"`
	Tail  bool                  `json:"tail"`
	Value *TemplateElementValue `json:"value"`
}

https://github.com/estree/estree/blob/master/es2015.md#templateelement

type TemplateElementValue

type TemplateElementValue struct {
	Cooked string `json:"cooked"`
	Raw    string `json:"raw"`
}

type TemplateLiteral

type TemplateLiteral struct {
	Type        string       `json:"type"`
	Start       int          `json:"start"`
	End         int          `json:"end"`
	Loc         *SrcLoc      `json:"loc"`
	Quasis      []Expression `json:"quasis"`
	Expressions []Expression `json:"expressions"`
}

https://github.com/estree/estree/blob/master/es2015.md#templateliteral

type ThisExpression

type ThisExpression struct {
	Type  string  `json:"type"`
	Start int     `json:"start"`
	End   int     `json:"end"`
	Loc   *SrcLoc `json:"loc"`
}

type ThrowStatement

type ThrowStatement struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
}

https://github.com/estree/estree/blob/master/es5.md#throwstatement

type TryStatement

type TryStatement struct {
	Type      string     `json:"type"`
	Start     int        `json:"start"`
	End       int        `json:"end"`
	Loc       *SrcLoc    `json:"loc"`
	Block     Statement  `json:"block"`
	Handler   Expression `json:"handler"`
	Finalizer Statement  `json:"finalizer"`
}

https://github.com/estree/estree/blob/master/es5.md#trystatement

type UnaryExpression

type UnaryExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Operator string     `json:"operator"` //  "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
	Prefix   bool       `json:"prefix"`
	Argument Expression `json:"argument"`
}

https://github.com/estree/estree/blob/master/es5.md#unaryexpression

type UpdateExpression

type UpdateExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Operator string     `json:"operator"` // "++" | "--"
	Argument Expression `json:"argument"`
	Prefix   bool       `json:"prefix"`
}

https://github.com/estree/estree/blob/master/es5.md#updateexpression

type VariableDeclaration

type VariableDeclaration struct {
	Type         string                `json:"type"`
	Start        int                   `json:"start"`
	End          int                   `json:"end"`
	Loc          *SrcLoc               `json:"loc"`
	Kind         string                `json:"kind"`
	Declarations []*VariableDeclarator `json:"declarations"`
}

https://github.com/estree/estree/blob/master/es5.md#variabledeclaration

type VariableDeclarator

type VariableDeclarator struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Id    Pattern    `json:"id"`
	Init  Expression `json:"init"`
}

https://github.com/estree/estree/blob/master/es5.md#variabledeclarator

type WhileStatement

type WhileStatement struct {
	Type  string     `json:"type"`
	Start int        `json:"start"`
	End   int        `json:"end"`
	Loc   *SrcLoc    `json:"loc"`
	Test  Expression `json:"test"`
	Body  Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#whilestatement

type WithStatement

type WithStatement struct {
	Type   string     `json:"type"`
	Start  int        `json:"start"`
	End    int        `json:"end"`
	Loc    *SrcLoc    `json:"loc"`
	Object Expression `json:"object"`
	Body   Statement  `json:"body"`
}

https://github.com/estree/estree/blob/master/es5.md#withstatement

type YieldExpression

type YieldExpression struct {
	Type     string     `json:"type"`
	Start    int        `json:"start"`
	End      int        `json:"end"`
	Loc      *SrcLoc    `json:"loc"`
	Argument Expression `json:"argument"`
	Delegate bool       `json:"delegate"`
}

https://github.com/estree/estree/blob/master/es2015.md#yieldexpression

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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