* Add test
* Add nonOctalDecimal verification
* Update regex and code style
* Refactor non octal detection
* Add numeric separator test
* Disallow numeric separators in non octals
* Update whitelist
* Better test naming
* Disallow numeric separators in non oct for all numbers
* Specific error above the general error
* Add test for invalid leading zero in num separator
* Add start position to error
* [parser] Disallow numeric separator in unicode scape sequences (#10460)
* raise error only when numeric separator plugin is set
* Adds argument for checking numeric separator
* Fix condition for readability
* Add test for hex escape sequence and rephrase error message
* Remove exposure for allowNumSeparator in readHexChar method
* 🚀 added check to disallow super.private variable access and test case added
* ♻️ change the other linting change back to how it was
* ♻️ change the other linting change back to how it was
* ♻️ added newline at the end test output.json file
* ♻️ changed the linting style to the way it was
* ♻️ updated error message, removed super private member access test cases from whitelist of flow and test 262 suite
* ♻️ added newline in output.json
* Disallow static fields named `constructor` in a class
- Disallowed static fields named `constructor` in a class (previously only non-static were disallowed)
- Updated the text for the error for one consolidated warning, for both static and non-static fields
- Added a test
- Updated an existing test in the `flow` test suite of the parser to reflect the parse error.
Strangely, the test used to pass and started failing when inlining the `isNonstaticConstructor` method, without any changes.
In that test, `constructor` was a field, so in theory it should never have passed.
Would appreciate some feedback on this, as I'm not 100% sure if this is somehow related to Flow
* Update test262 whitelist
* Add comment and fix && operator
Flow maybe types state;
> Maybe types accept the provided type as well as null or undefined. So ?number would mean number, null, or undefined.
So in this case, explicitly allow the type, null, or undefined in the
typescript definition.
Fixes#10403
* 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
* ♻️ added condition to check for left and right of nullish coalescing operator and if any is a logical expression without a paren then throw an error
* 🐛 bugs fixed and test cases updated for babel parser
* ♻️ code comments added
* 🐛 spell error rectified
* ♻️ failing test updated
* 🐛 push tests after make build
* Skip nullish-coalescing flow precedence tests
They're now incorrect
* ♻️ error message updated, binop priority of other logical operators +1 from ?? and
* ♻️ increaed the binOp for in and instanceOf, added logic to print the brackets in an ?? && || expression, test cases added
* 🐛 failing test fixed and comments updated
* ♻️ new lines added between tests
* ♻️ basic tests for checking the binOp of instanceOf, in and relational operators to be equal added
* ♻️ new lines added in between tests
* fix: transform name capturing regex once
* refactor: early return when pattern contains only lookbehind
* chore: simplify test regex
* chore: run test on >=8.0.0
* Refactor trailing comment adjustment
Following up from https://github.com/babel/babel/pull/10369
- Unify the logic for adjusting trailing comments into a separate
function
- Use it for all three cases, which fixes a bug for ObjectExpressions
and CallExpressions
- Update tests to check for the fixed bug
* Fix tests
- Only modify trailingComments if necessary
- Update snapshots of a couple of affected tests
* Drop the underscore in adjustCommentsAfterTrailingComma_
* Handle ArrayPattern
* Handle ObjectPattern
* Handle import and export declarations
These have to be handled a bit differently, because the node is visited after the and before the declaration. So we intercept when we are going from the last specifier to the source node.
* Remove unnecessary check