Merge branch 'master' into 7.0
This commit is contained in:
commit
12abc20575
10
ast/spec.md
10
ast/spec.md
@ -76,6 +76,7 @@ These are the core Babylon AST node types.
|
||||
- [CallExpression](#callexpression)
|
||||
- [NewExpression](#newexpression)
|
||||
- [SequenceExpression](#sequenceexpression)
|
||||
- [DoExpression](#doexpression)
|
||||
- [Template Literals](#template-literals)
|
||||
- [TemplateLiteral](#templateliteral)
|
||||
- [TaggedTemplateExpression](#taggedtemplateexpression)
|
||||
@ -907,6 +908,15 @@ interface SequenceExpression <: Expression {
|
||||
|
||||
A sequence expression, i.e., a comma-separated sequence of expressions.
|
||||
|
||||
## DoExpression
|
||||
|
||||
```js
|
||||
interface DoExpression <: Expression {
|
||||
type: "DoExpression";
|
||||
body: BlockStatement
|
||||
}
|
||||
```
|
||||
|
||||
# Template Literals
|
||||
|
||||
## TemplateLiteral
|
||||
|
||||
3
test/fixtures/estree/directives/program-order/actual.js
vendored
Normal file
3
test/fixtures/estree/directives/program-order/actual.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
"use loose";
|
||||
var a;
|
||||
150
test/fixtures/estree/directives/program-order/expected.json
vendored
Normal file
150
test/fixtures/estree/directives/program-order/expected.json
vendored
Normal file
@ -0,0 +1,150 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 6
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 6
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 0,
|
||||
"end": 13,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "Literal",
|
||||
"start": 0,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"value": "use strict",
|
||||
"raw": "\"use strict\""
|
||||
},
|
||||
"directive": "use strict"
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 14,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "Literal",
|
||||
"start": 14,
|
||||
"end": 25,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"value": "use loose",
|
||||
"raw": "\"use loose\""
|
||||
},
|
||||
"directive": "use loose"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start": 27,
|
||||
"end": 33,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 6
|
||||
}
|
||||
},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start": 31,
|
||||
"end": 32,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 31,
|
||||
"end": 32,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 5
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"init": null
|
||||
}
|
||||
],
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user