-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
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
More user-controllable verbatim
property
#173
Comments
What do you think of exposing node['x-verbatim-property'] = {
content: 'string',
precedence: escodegen.Precedence.XXX
}; Pros
Cons
|
@Constellation I think it is a good idea to set a option object. I'm worried about Cons, too. |
Agreed. So I'll expose |
I've published version |
azu
added a commit
to azu/escodegen_array
that referenced
this issue
Mar 9, 2014
@Constellation Thnaks! great job! Test passed on example project 💚 --- a/index.js
+++ b/index.js
@@ -23,7 +23,10 @@ function main(code) {
function embedVerbatim(node) {
var embed = helper.getCodeFromRange(node.range);
if (embed) {
- node["x-verbatim-property"] = embed
+ node["x-verbatim-property"] = {
+ content : embed,
+ precedence : escodegen.Precedence.Primary
+ }
}
} |
azu
added a commit
to azu/remove-use-strict
that referenced
this issue
Mar 9, 2014
we can control! estools/escodegen#173
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
escodegen 1.2.0 generate unnecessary
(
)
aroundverbatim
property value.I expected result
"fn([1,2,3])"
More detail in that project.
I want to control the parenthesize.
Thanks.
The text was updated successfully, but these errors were encountered: