-
Notifications
You must be signed in to change notification settings - Fork 467
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
Remove To_String
by using AST->to_string
and inspect
#1858
Remove To_String
by using AST->to_string
and inspect
#1858
Conversation
87d0333
to
fc75b8f
Compare
fc75b8f
to
c17f656
Compare
c17f656
to
adf05c4
Compare
@xzyfer I'm thinking about renaming I also want to add an emitter that does not create a sourcemap, since for these methods it's not necesarry (but that's really just a performance optimization). Things start to come together. |
This is a great change. I wasn't expecting to implement this until 3.4. Nice work. |
Remove `To_String` by using `AST->to_string` and `inspect`
I am getting this now:
is it because of this change?
|
Yes, see #1917 (comment) |
This cleans up the usage of
perform(&to_string)
by only using inspect. Also adding additionalTO_SASS
output mode, since ruby sass has differences betweento_sass
andinspect
and both are used in various places (i.e. error reporting). Now everyAST_Node
has ato_string
,to_sass
andinspect
method, and all return a std::string. They all internaly use theinspect
visitors, so we only need to implement all types only once for all variations in one place. With this I hope we can more easily match ruby sass and I already saw one or two things that need to be implemented for certain options. Theto_sass
mode specially is responsible to add parentheses were needed.This is basically the continuation of #1754