使用import() 时,解析出错;
Open
- Dominant language
- TypeScript
- Stars
- 5.3k
- Forks
- 363
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 3
Description
代码中有用到 import() 语句。但是转化为AST时报错;
"recast": "^0.20.5"
`
const { parse } = require('recast');
const ast = parse('import(./a.js)');
`

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported parse call with recast ^0.20.5 and verify whether the import() example is valid JavaScript syntax. Then inspect the parser entry point used by recast and define done as correctly parsing a valid dynamic import without an AST error, with the expected behavior covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100