Skip to content

Commit

Permalink
set nodeType for root node
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Jan 22, 2025
1 parent a042de5 commit 4a95357
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shared/AstOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const AstOutput: React.FC<AstOutputProps> = ({ node }) => {
if (!IGNORE_KEYS.includes(key)) {
const [newKey, value] = getNewKeyValue(node, key);
result[newKey] = value;
if (key === "kind") {
result["nodeType"] = syntaxKinds[value.toString()];
}
}
});
return result;
Expand Down

0 comments on commit 4a95357

Please sign in to comment.