Comparing version 0.2.11 to 0.2.12-dev.20190609
@@ -72,3 +72,5 @@ import { Token } from './token'; | ||
IsAssignable = 1, | ||
CannotAssign = 2 | ||
CannotAssign = 2, | ||
Await = 4, | ||
Yield = 8 | ||
} | ||
@@ -89,3 +91,4 @@ export declare const enum DestructuringKind { | ||
Octals = 64, | ||
SimpleParameterList = 128 | ||
SimpleParameterList = 128, | ||
Yield = 256 | ||
} | ||
@@ -121,3 +124,3 @@ export declare const enum FunctionStatement { | ||
export declare function reinterpretToPattern(state: ParserState, node: any): void; | ||
export declare function validateBindingIdentifier(parser: ParserState, context: Context, type: BindingType, t: Token): void; | ||
export declare function validateBindingIdentifier(parser: ParserState, context: Context, type: BindingType, t: Token, skipEvalArgCheck: 0 | 1): void; | ||
export declare function isStrictReservedWord(parser: ParserState, context: Context, t: Token): boolean; | ||
@@ -124,0 +127,0 @@ export declare function isPropertyWithPrivateFieldKey(expr: any): boolean; |
import { Token } from './token'; | ||
import * as ESTree from './estree'; | ||
import { Context, ParserState, PropertyKind, BindingOrigin, FunctionStatement, BindingType } from './common'; | ||
import { Context, ParserState, PropertyKind, BindingOrigin, Flags, FunctionStatement, BindingType } from './common'; | ||
export declare function create(source: string): ParserState; | ||
@@ -14,3 +14,2 @@ export interface Options { | ||
globalReturn?: boolean; | ||
globalAwait?: boolean; | ||
impliedStrict?: boolean; | ||
@@ -74,7 +73,7 @@ parenthesizedExpr?: boolean; | ||
export declare function parseFunctionDeclaration(parser: ParserState, context: Context, allowGen: 0 | 1, isExportDefault: 0 | 1, isAsync: 0 | 1, start: number): ESTree.FunctionDeclaration; | ||
export declare function parseFunctionExpression(parser: ParserState, context: Context, isAsync: 0 | 1, start: number): ESTree.FunctionExpression; | ||
export declare function parseFunctionExpression(parser: ParserState, context: Context, isAsync: 0 | 1, inGroup: 0 | 1, start: number): ESTree.FunctionExpression; | ||
export declare function parseArrayExpressionOrPattern(parser: ParserState, context: Context, skipInitializer: 0 | 1, inGroup: 0 | 1, type: BindingType, start: number): ESTree.ArrayExpression | ESTree.ArrayPattern; | ||
export declare function parseMethodDefinition(parser: ParserState, context: Context, kind: PropertyKind, start: number): ESTree.FunctionExpression; | ||
export declare function parseMethodDefinition(parser: ParserState, context: Context, kind: PropertyKind, inGroup: 0 | 1, start: number): ESTree.FunctionExpression; | ||
export declare function parseObjectLiteralOrPattern(parser: ParserState, context: Context, skipInitializer: 0 | 1, inGroup: 0 | 1, type: BindingType, start: number): ESTree.ObjectExpression | ESTree.ObjectPattern | ESTree.AssignmentExpression; | ||
export declare function parseMethodFormals(parser: ParserState, context: Context, kind: PropertyKind, type: BindingType): any[]; | ||
export declare function parseMethodFormals(parser: ParserState, context: Context, kind: PropertyKind, type: BindingType, inGroup: 0 | 1): any[]; | ||
export declare function parseComputedPropertyName(parser: ParserState, context: Context, inGroup: 0 | 1): ESTree.Expression; | ||
@@ -84,7 +83,7 @@ export declare function parseParenthesizedExpression(parser: ParserState, context: Context, assignable: 0 | 1, start: number): any; | ||
export declare function parseArrowFunctionExpression(parser: ParserState, context: Context, params: ESTree.Pattern[], isAsync: 0 | 1, start: number): ESTree.ArrowFunctionExpression; | ||
export declare function parseFormalParametersOrFormalList(parser: ParserState, context: Context, type: BindingType): any[]; | ||
export declare function parseFormalParametersOrFormalList(parser: ParserState, context: Context, inGroup: 0 | 1, type: BindingType): any[]; | ||
export declare function parseNewExpression(parser: ParserState, context: Context, inGroup: 0 | 1, start: number): ESTree.NewExpression | ESTree.Expression | ESTree.MetaProperty; | ||
export declare function parseMetaProperty(parser: ParserState, context: Context, meta: ESTree.Identifier, start: number): ESTree.MetaProperty; | ||
export declare function parseAsyncExpression(parser: ParserState, context: Context, expr: ESTree.Identifier, inNewExpression: 0 | 1, assignable: 0 | 1, start: number): ESTree.Expression; | ||
export declare function parseAsyncArrowOrCallExpression(parser: ParserState, context: Context, callee: ESTree.Identifier | void, assignable: 0 | 1, asyncNewLine: number, start: number): any; | ||
export declare function parseAsyncExpression(parser: ParserState, context: Context, expr: ESTree.Identifier, inNewExpression: 0 | 1, assignable: 0 | 1, inGroup: 0 | 1, start: number): ESTree.Expression; | ||
export declare function parseAsyncArrowOrCallExpression(parser: ParserState, context: Context, callee: ESTree.Identifier | void, assignable: 0 | 1, flags: Flags, start: number): any; | ||
export declare function parseRegExpLiteral(parser: ParserState, context: Context, start: number): ESTree.RegExpLiteral; | ||
@@ -91,0 +90,0 @@ export declare function parseClassDeclaration(parser: ParserState, context: Context, isExportDefault: 0 | 1, start: number): ESTree.ClassDeclaration; |
@@ -0,0 +0,0 @@ ISC License |
{ | ||
"name": "meriyah", | ||
"version": "0.2.11", | ||
"version": "0.2.12-dev.20190609", | ||
"description": "A 100% compliant, self-hosted javascript parser with high focus on both performance and stability", | ||
@@ -63,13 +63,13 @@ "main": "dist/meriyah.umd.js", | ||
"devDependencies": { | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.0.2", | ||
"coveralls": "^3.0.3", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.0.7", | ||
"coveralls": "^3.0.4", | ||
"cross-env": "^5.2.0", | ||
"husky": "^2.3.0", | ||
"husky": "^2.4.0", | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.1.1", | ||
"path": "^0.12.7", | ||
"prettier": "^1.17.1", | ||
"prettier": "^1.18.2", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.13.0", | ||
"rollup": "^1.14.4", | ||
"rollup-plugin-replace": "^2.2.0", | ||
@@ -93,2 +93,2 @@ "rollup-plugin-terser": "^5.0.0", | ||
} | ||
} | ||
} |
@@ -82,3 +82,5 @@ import { Token, KeywordDescTable } from './token'; | ||
IsAssignable = 1 << 0, | ||
CannotAssign = 1 << 1 | ||
CannotAssign = 1 << 1, | ||
Await = 1 << 2, | ||
Yield = 1 << 3, | ||
} | ||
@@ -106,3 +108,4 @@ | ||
Octals = 1 << 6, | ||
SimpleParameterList = 1 << 7 | ||
SimpleParameterList = 1 << 7, | ||
Yield = 1 << 8, | ||
} | ||
@@ -247,3 +250,4 @@ | ||
type: BindingType, | ||
t: Token | ||
t: Token, | ||
skipEvalArgCheck: 0 | 1 | ||
): void { | ||
@@ -261,3 +265,3 @@ if ((t & Token.Keyword) !== Token.Keyword) return; | ||
if ((t & Token.IsEvalOrArguments) === Token.IsEvalOrArguments) { | ||
if (!skipEvalArgCheck && (t & Token.IsEvalOrArguments) === Token.IsEvalOrArguments) { | ||
report(parser, Errors.StrictEvalArguments); | ||
@@ -264,0 +268,0 @@ } |
@@ -0,0 +0,0 @@ import { unicodeLookup } from '../unicode'; |
@@ -68,3 +68,3 @@ import { ParserState, Context } from '../common'; | ||
? Token.Identifier | ||
: keyword === Token.YieldKeyword | ||
: keyword === Token.YieldKeyword || !hasEscape | ||
? keyword | ||
@@ -71,0 +71,0 @@ : (keyword & Token.FutureReserved) === Token.FutureReserved |
@@ -0,0 +0,0 @@ ### Lexer source |
@@ -0,0 +0,0 @@ import { Context } from './common'; |
@@ -0,0 +0,0 @@ // Unicode v. 12 support |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2281029
70
42334