Huáng Jùnliàng 21d7ee2610 String import/export specifier (#12091)
* feat: parse moduleExportName
* feat: add validators
* Support string specifier name in commonjs transform
* Support string specifier name in export-ns-from
* test: add loose testcases
* test: add testcases for amd and umd
* feat: support systemjs
* test: update fixtures fixed in #12110
* add plugin name typings
* test: rename test layout
* feat: implement under moduleStringNames flag
* chore: add plugin syntax module string names
* feat: support ModuleExportName as ModuleExportName
* test: update test fixtures
* fix flow errors
* docs: update AST spec
* feat: support { "some imports" as "some exports" }
* feat: support { "some imports" as "some exports" } in systemjs
* test: add test on `import { "foo" }`
* Address review comments
* add moduleStringNames to missing plugin helpers
* Apply suggestions from code review
* update test fixtures
* Update packages/babel-parser/src/parser/error-message.js
* update test fixtures

Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:01:37 +02:00

46 lines
1.5 KiB
JSON

{
"type": "File",
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
"program": {
"type": "Program",
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ImportDeclaration",
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
"specifiers": [
{
"type": "ImportSpecifier",
"start":8,"end":30,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":30}},
"imported": {
"type": "StringLiteral",
"start":8,"end":17,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":17}},
"extra": {
"rawValue": "default",
"raw": "\"default\""
},
"value": "default"
},
"local": {
"type": "Identifier",
"start":21,"end":30,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":30},"identifierName":"quotation"},
"name": "quotation"
}
}
],
"source": {
"type": "StringLiteral",
"start":37,"end":48,"loc":{"start":{"line":1,"column":37},"end":{"line":1,"column":48}},
"extra": {
"rawValue": "Confucius",
"raw": "\"Confucius\""
},
"value": "Confucius"
}
}
],
"directives": []
}
}