V8intrinsic syntax plugin (#10148)
* feat: v8intrinsic syntax plugin Implement V8 Intrinsic Syntax Extension. Here we check the execution branch inside the parseSubscript to make sure the V8IntrinsicIdentifier is immediately followed by a call expression. * feat: disable combining placeholders and v8intrisic per https://github.com/babel/babel/issues/10104#issuecomment-506950969 * test: add more error cases * refactor: parse v8 intrinsic in parseExprAtom This approach is identical to V8’s implementation. Move the test cases as the behaviour changes. * fix: plugin-name typo * test: add yield-expression test case * feat: require startsExpr on modulo for v8intrinsic * perf: skip eof and braceR check as they must return false * Print V8IntrinsicIdentifier * feat: add v8intrinsic to parser typings * Add generated type helpers * fix: incorrect type definition * fix: allow V8IntrinsicIdentifier to be callee
This commit is contained in:
committed by
Nicolò Ribaudo
parent
b02e35c19a
commit
da0af5fd99
@@ -2191,7 +2191,7 @@ export default class ExpressionParser extends LValParser {
|
||||
if (
|
||||
this.match(tt.semi) ||
|
||||
(!this.match(tt.star) && !this.state.type.startsExpr) ||
|
||||
this.canInsertSemicolon()
|
||||
this.hasPrecedingLineBreak()
|
||||
) {
|
||||
node.delegate = false;
|
||||
node.argument = null;
|
||||
|
||||
Reference in New Issue
Block a user