Open kungfooman opened 1 month ago
Example input:
import React, { useState, useEffect, useRef } from 'react';
Current wrong output:
import React, useState, useEffect, useRef from 'react';
AST:
{ "type": "File", "errors": [], "program": { "type": "Program", "sourceType": "module", "interpreter": null, "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "React" } }, { "type": "ImportSpecifier", "imported": { "type": "Identifier", "name": "useState" }, "local": { "type": "Identifier", "name": "useState" } }, { "type": "ImportSpecifier", "imported": { "type": "Identifier", "name": "useEffect" }, "local": { "type": "Identifier", "name": "useEffect" } }, { "type": "ImportSpecifier", "imported": { "type": "Identifier", "name": "useRef" }, "local": { "type": "Identifier", "name": "useRef" } } ], "source": { "type": "StringLiteral", "extra": { "rawValue": "react", "raw": "'react'" }, "value": "react" } } ], "directives": [] }, "comments": [] }
Example input:
Current wrong output:
AST: