Comparing version 0.0.55 to 0.0.56
export interface Node { | ||
type?: string; | ||
kind?: SyntaxKind | NodeFlags; | ||
meta?: NodeMeta; | ||
@@ -19,235 +18,2 @@ flags?: NodeFlags; | ||
} | ||
export declare enum SyntaxKind { | ||
EndOfFileToken = 0, | ||
UnknownToken = 1, | ||
Comment = 2, | ||
LeftParen = 3, | ||
RightParen = 4, | ||
RightBrace = 5, | ||
LeftBrace = 6, | ||
RightBracket = 7, | ||
LeftBracket = 8, | ||
FirstToken = 9, | ||
NumericLiteral = 10, | ||
BigIntLiteral = 11, | ||
StringLiteral = 12, | ||
Identifier = 13, | ||
TemplateTail = 14, | ||
RegularExpressionLiteral = 15, | ||
BitwiseOr = 16, | ||
Complement = 17, | ||
Negate = 18, | ||
Modulo = 19, | ||
BitwiseAnd = 20, | ||
Multiply = 21, | ||
Add = 22, | ||
Comma = 23, | ||
Subtract = 24, | ||
Period = 25, | ||
Divide = 26, | ||
Colon = 27, | ||
Semicolon = 28, | ||
LessThan = 29, | ||
Assign = 30, | ||
GreaterThan = 31, | ||
QuestionMark = 32, | ||
BitwiseXor = 33, | ||
QuestionMarkPeriod = 34, | ||
NullishAssign = 35, | ||
Nullish = 36, | ||
BitwiseXorAssign = 37, | ||
BitwiseOrAssign = 38, | ||
LogicalOr = 39, | ||
LogicalOrAssign = 40, | ||
BitwiseAndAssign = 41, | ||
LogicalAnd = 42, | ||
LogicalAndAssign = 43, | ||
DivideAssign = 44, | ||
ModuloAssign = 45, | ||
Exponentiate = 46, | ||
ExponentiateAssign = 47, | ||
MultiplyAssign = 48, | ||
SubtractAssign = 49, | ||
Decrement = 50, | ||
AddAssign = 51, | ||
Increment = 52, | ||
LooseNotEqual = 53, | ||
StrictNotEqual = 54, | ||
Arrow = 55, | ||
LooseEqual = 56, | ||
StrictEqual = 57, | ||
ShiftRight = 58, | ||
Ellipsis = 59, | ||
ShiftRightAssign = 60, | ||
LogicalShiftRight = 61, | ||
LogicalShiftRightAssign = 62, | ||
GreaterThanOrEqual = 63, | ||
ShiftLeft = 64, | ||
ShiftLeftAssign = 65, | ||
LessThanOrEqual = 66, | ||
ThisKeyword = 67, | ||
FunctionKeyword = 68, | ||
IfKeyword = 69, | ||
ReturnKeyword = 70, | ||
VarKeyword = 71, | ||
ElseKeyword = 72, | ||
ForKeyword = 73, | ||
NewKeyword = 74, | ||
InKeyword = 75, | ||
TypeofKeyword = 76, | ||
WhileKeyword = 77, | ||
CaseKeyword = 78, | ||
BreakKeyword = 79, | ||
TryKeyword = 80, | ||
CatchKeyword = 81, | ||
DeleteKeyword = 82, | ||
ThrowKeyword = 83, | ||
SwitchKeyword = 84, | ||
ContinueKeyword = 85, | ||
DefaultKeyword = 86, | ||
InstanceofKeyword = 87, | ||
DoKeyword = 88, | ||
VoidKeyword = 89, | ||
FinallyKeyword = 90, | ||
AsyncKeyword = 91, | ||
AwaitKeyword = 92, | ||
ClassKeyword = 93, | ||
ConstKeyword = 94, | ||
ConstructorKeyword = 95, | ||
DebuggerKeyword = 96, | ||
ExportKeyword = 97, | ||
ExtendsKeyword = 98, | ||
FalseKeyword = 99, | ||
FromKeyword = 100, | ||
GetKeyword = 101, | ||
ImplementsKeyword = 102, | ||
ImportKeyword = 103, | ||
InterfaceKeyword = 104, | ||
LetKeyword = 105, | ||
NullKeyword = 106, | ||
OfKeyword = 107, | ||
PackageKeyword = 108, | ||
PrivateKeyword = 109, | ||
ProtectedKeyword = 110, | ||
PublicKeyword = 111, | ||
SetKeyword = 112, | ||
StaticKeyword = 113, | ||
SuperKeyword = 114, | ||
TrueKeyword = 115, | ||
WithKeyword = 116, | ||
YieldKeyword = 117, | ||
AsKeyword = 118, | ||
TargetKeyword = 119, | ||
MetaKeyword = 120, | ||
EnumKeyword = 121, | ||
ExpressionStatement = 122, | ||
BlockStatement = 123, | ||
BreakStatement = 124, | ||
ContinueStatement = 125, | ||
DebuggerStatement = 126, | ||
DoWhileStatement = 127, | ||
WithStatement = 128, | ||
ForAwaitStatement = 129, | ||
ForInStatement = 130, | ||
ForOfStatement = 131, | ||
ForStatement = 132, | ||
IfStatement = 133, | ||
LabelledStatement = 134, | ||
ReturnStatement = 135, | ||
SwitchStatement = 136, | ||
ThrowStatement = 137, | ||
TryStatement = 138, | ||
WhileStatement = 139, | ||
CatchClause = 140, | ||
CaseClause = 141, | ||
DefaultClause = 142, | ||
VariableStatement = 143, | ||
VariableDeclaration = 144, | ||
LexicalDeclaration = 145, | ||
LexicalBinding = 146, | ||
CommaOperator = 147, | ||
EmptyStatement = 148, | ||
ClassExpression = 149, | ||
ClassDeclaration = 150, | ||
ClassElement = 151, | ||
AssignmentExpression = 152, | ||
ConditionalExpression = 153, | ||
MemberExpression = 154, | ||
BinaryExpression = 155, | ||
CallExpression = 156, | ||
OptionalExpression = 157, | ||
MemberChain = 158, | ||
CallChain = 159, | ||
UnaryExpression = 160, | ||
PrefixUpdateExpression = 161, | ||
PostfixUpdateExpression = 162, | ||
NewExpression = 163, | ||
NullLiteral = 164, | ||
ThisExpression = 165, | ||
BooleanLiteral = 166, | ||
BindingRestProperty = 167, | ||
BindingIdentifier = 168, | ||
ObjectBindingPattern = 169, | ||
BindingProperty = 170, | ||
ComputedPropertyName = 171, | ||
BindingElement = 172, | ||
SingleNameBinding = 173, | ||
ArrayBindingPattern = 174, | ||
BindingRestElement = 175, | ||
Elison = 176, | ||
SpreadElement = 177, | ||
ArrayLiteral = 178, | ||
ObjectLiteral = 179, | ||
PropertyDefinition = 180, | ||
CoverInitializedName = 181, | ||
MethodDefinition = 182, | ||
FormalParameters = 183, | ||
FunctionBody = 184, | ||
FunctionExpression = 185, | ||
FunctionDeclaration = 186, | ||
ConciseBody = 187, | ||
ArrowFunction = 188, | ||
ParenthesizedExpression = 189, | ||
AwaitExpression = 190, | ||
SuperCall = 191, | ||
SuperProperty = 192, | ||
YieldExpression = 193, | ||
TaggedTemplate = 194, | ||
TemplateElement = 195, | ||
TemplateExpression = 196, | ||
TemplateLiteral = 197, | ||
NewTarget = 198, | ||
ImportCall = 199, | ||
AssignmentRestElement = 200, | ||
ForDeclaration = 201, | ||
ForBinding = 202, | ||
WhiteSpace = 203, | ||
CarriageReturn = 204, | ||
LineFeed = 205, | ||
Unknown = 206, | ||
Module = 207, | ||
Script = 208, | ||
RootNode = 209, | ||
EOF = 210, | ||
ObjectAssignmentPattern = 211, | ||
AssignmentProperty = 212, | ||
AssignmentElement = 213, | ||
ArrayAssignmentPattern = 214, | ||
SpreadProperty = 215, | ||
FunctionRestParameter = 216, | ||
ImportDeclaration = 217, | ||
ImportClause = 218, | ||
NameSpaceImport = 219, | ||
ImportedDefaultBinding = 220, | ||
ImportSpecifier = 221, | ||
NamedImports = 222, | ||
ExportDeclaration = 223, | ||
ExportDefault = 224, | ||
ExportSpecifier = 225, | ||
OptionalChain = 226, | ||
PropertyName = 227, | ||
ImportMeta = 228, | ||
Directive = 229, | ||
FloatingPointLiteral = 230 | ||
} | ||
//# sourceMappingURL=node.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { SyntaxKind, Node } from './node'; | ||
import { Node } from './node'; | ||
import { Diagnostic } from '../diagnostic'; | ||
@@ -7,3 +7,2 @@ import { Flags, Context } from '../common'; | ||
export interface RootNode extends Node { | ||
readonly kind: SyntaxKind.RootNode; | ||
readonly directives: Directive[]; | ||
@@ -10,0 +9,0 @@ readonly leafs: ImportExport[]; |
@@ -1,6 +0,1 @@ | ||
import { SyntaxKind, Node } from './node'; | ||
export interface SyntaxToken<TokenKind extends TokenSyntaxKind> extends Node { | ||
kind: TokenKind; | ||
} | ||
export declare type TokenSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.UnknownToken | SyntaxKind.Comment | SyntaxKind.LessThan | SyntaxKind.GreaterThan | SyntaxKind.LogicalAnd | SyntaxKind.LogicalOr | SyntaxKind.BitwiseOr | SyntaxKind.Complement | SyntaxKind.Negate | SyntaxKind.Modulo | SyntaxKind.BitwiseAnd | SyntaxKind.Multiply | SyntaxKind.Add | SyntaxKind.Comma | SyntaxKind.Subtract | SyntaxKind.Period | SyntaxKind.Divide | SyntaxKind.Colon | SyntaxKind.Semicolon | SyntaxKind.LessThan | SyntaxKind.Assign | SyntaxKind.GreaterThan | SyntaxKind.QuestionMark | SyntaxKind.BitwiseXor | SyntaxKind.QuestionMarkPeriod | SyntaxKind.NullishAssign | SyntaxKind.Nullish | SyntaxKind.BitwiseXorAssign | SyntaxKind.BitwiseOrAssign | SyntaxKind.LogicalOr | SyntaxKind.LogicalOrAssign | SyntaxKind.BitwiseAndAssign | SyntaxKind.LogicalAnd | SyntaxKind.LogicalAndAssign | SyntaxKind.DivideAssign | SyntaxKind.ModuloAssign | SyntaxKind.Exponentiate | SyntaxKind.ExponentiateAssign | SyntaxKind.MultiplyAssign | SyntaxKind.SubtractAssign | SyntaxKind.Decrement | SyntaxKind.AddAssign | SyntaxKind.Increment | SyntaxKind.LooseNotEqual | SyntaxKind.StrictNotEqual | SyntaxKind.Arrow | SyntaxKind.LooseEqual | SyntaxKind.StrictEqual | SyntaxKind.ShiftRight | SyntaxKind.ShiftRightAssign | SyntaxKind.LogicalShiftRight | SyntaxKind.LogicalShiftRightAssign | SyntaxKind.GreaterThanOrEqual | SyntaxKind.ShiftLeft | SyntaxKind.ShiftLeftAssign | SyntaxKind.Ellipsis | SyntaxKind.LessThanOrEqual; | ||
export declare const enum Token { | ||
@@ -163,3 +158,3 @@ Type = 255, | ||
export declare const KeywordDescTable: string[]; | ||
export declare function createToken<T extends TokenSyntaxKind>(source: string, tokenKind: T): SyntaxToken<T>; | ||
export declare function createToken<T extends Token>(source: string, tokenKind: T): any; | ||
//# sourceMappingURL=token.d.ts.map |
import { Token } from './ast/token'; | ||
import { DiagnosticCode } from './diagnostic/diagnostic-code'; | ||
import { SyntaxKind } from './ast/node'; | ||
export declare const enum Context { | ||
@@ -142,3 +141,3 @@ Empty = 0, | ||
export declare function lastOrUndefined<T>(array: readonly T[]): T | undefined; | ||
export declare function finishNode(state: ParserState, context: Context, start: number, node: any, kind: SyntaxKind): any; | ||
export declare function finishNode(state: ParserState, context: Context, start: number, node: any): any; | ||
export declare function reinterpretToPattern(node: any): void; | ||
@@ -145,0 +144,0 @@ export declare function reinterpretToAssignment(node: any): void; |
@@ -201,3 +201,3 @@ import { ExportFromClause } from './ast/module/export-from-clause'; | ||
export declare function parseAsyncArrowExpression(state: ParserState, context: Context, assignable: boolean, start: number): Expression; | ||
export declare function parseFunctionDeclaration(state: ParserState, context: Context, scope: any, disallowGen: boolean, isHoisted?: boolean): FunctionDeclaration | ExpressionStatement | ArrowFunction; | ||
export declare function parseFunctionDeclaration(state: ParserState, context: Context, scope: ScopeState, disallowGen: boolean, isHoisted?: boolean): FunctionDeclaration | ExpressionStatement | ArrowFunction; | ||
export declare function parseAsyncArrowDeclaration(state: ParserState, context: Context, start: number): any; | ||
@@ -204,0 +204,0 @@ export declare function parseArrowAfterIdentifier(state: ParserState, context: Context, params: BindingIdentifier, value: string, assignable: boolean, kind: ArrowKind, start: number): ArrowFunction; |
{ | ||
"name": "escaya", | ||
"version": "0.0.55", | ||
"version": "0.0.56", | ||
"description": "A blazing fast 100% spec compliant, self-hosted incremental javascript parser written in Typescript", | ||
@@ -5,0 +5,0 @@ "main": "dist/escaya.umd.min.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
416074
3295