We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there, I am getting a recast error into the Riot.js compiler similar to this old one
I could reproduce it with this example: https://runkit.com/gianlucaguarini/recast-bug-2
It seems that the sourcemaps generation fails in some cases when the code gets wrapped into round brackets.
Any help is really appreciated, thank you!
The text was updated successfully, but these errors were encountered:
I have updated the demo link since runkit is no longer working: https://codesandbox.io/p/devbox/dzm3ym
const recast = require("recast"); const types = recast.types; const builders = recast.types.builders; const scope = builders.identifier("scope"); const code = `( () => { update({ message: "test" }); } )`; const ast = recast.parse(code, { sourceFileName: "test.js", }); types.visit(ast, { visitIdentifier(path) { if (path.value.name === "message") return false; path.replace(builders.memberExpression(scope, path.node, false)); return false; }, }); const result = builders.arrowFunctionExpression( [scope], ast.program.body[0].expression ); console.log( recast.print(result, { sourceMapName: `source.map`, }) );
Sorry, something went wrong.
No branches or pull requests
Hi there,
I am getting a recast error into the Riot.js compiler similar to this old one
I could reproduce it with this example:
https://runkit.com/gianlucaguarini/recast-bug-2
It seems that the sourcemaps generation fails in some cases when the code gets wrapped into round brackets.
Any help is really appreciated, thank you!
The text was updated successfully, but these errors were encountered: