-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the feature
Hey 🙂!
So I'd like to parse any code using builder.raw, but it fails on some castings.
For example, I'd like to generate foo(bar) (bar being a variable), doing it like this does not work:
builders.functionCall("foo", builders.raw("bar"));Here are a few more examples.
const result = builders.raw("bar()");
console.log(generateCode(result)); // worksconst result = builders.raw("bar"); // MagicastError: Casting "Identifier" is not supported
console.log(generateCode(result));const result = builders.raw("() => 'a'"); // MagicastError: Casting "ArrowFunctionExpression" is not supported
console.log(generateCode(result));I can help with the implementation if needed!
Additional information
- Would you be willing to help implement this feature?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working