JSX empty expression location data (#5189)

This commit is contained in:
Julian Rosse
2019-03-31 18:04:08 -04:00
committed by Geoffrey Booth
parent 28a1a1d304
commit 7e0eb6a92d
4 changed files with 53 additions and 4 deletions

View File

@@ -425,7 +425,9 @@ test "AST as expected for JSXTag node", ->
raw: 'abc'
value: 'abc'
,
type: 'JSXEmptyExpression'
type: 'JSXExpressionContainer'
expression:
type: 'JSXEmptyExpression'
]
# test "AST as expected for PropertyName node", ->

View File

@@ -2996,6 +2996,17 @@ test "AST location data as expected for JSXTag node", ->
line: 1
column: 5
,
expression:
start: 6
end: 6
range: [6, 6]
loc:
start:
line: 1
column: 6
end:
line: 1
column: 6
start: 5
end: 7
range: [5, 7]