You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 19, 2018. It is now read-only.
Babylon gives Unterminated JSX contents error when an arrow field is wrapped in an object literal which is wrapped in parentheses.
Input Code
Smallest example I could extract:
({id: <T>(value) =>value});
The real-world example would be (that's why the parentheses are necessary):
constfunctionReturningIdentityAsAField=()=>({id: <T>(value: T): T =>value});
Babylon/Babel Configuration
{plugins: ["jsx","flow"]}
Expected Behavior
Parse without errors.
Current Behavior
throw err;
^
SyntaxError: Unterminated JSX contents (2:29)
at Parser.pp$5.raise (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:4373:13)
at Parser.pp$9.jsxReadToken (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:6653:12)
at Parser.<anonymous> (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:7028:21)
at Parser.readToken (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:5853:22)
at Parser.nextToken (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:764:19)
at Parser.next (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:689:10)
at Parser.eat (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:696:12)
at Parser.pp.expect (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:1704:15)
at Parser.pp$3.parseParenAndDistinguishExpression (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\
index.js:3767:8)
at Parser.pp$3.parseExprAtom (D:\Projects\Test\babylon_bug\node_modules\babylon\lib\index.js:3642:19)
Your Environment
software
version
Babylon
6.16.1
node
7.5.0
Operating System
windows 10
The text was updated successfully, but these errors were encountered:
Babylon gives
Unterminated JSX contents
error when an arrow field is wrapped in an object literal which is wrapped in parentheses.Input Code
Smallest example I could extract:
The real-world example would be (that's why the parentheses are necessary):
Babylon/Babel Configuration
Expected Behavior
Parse without errors.
Current Behavior
Your Environment
The text was updated successfully, but these errors were encountered: