-
Notifications
You must be signed in to change notification settings - Fork 13
Preserve raw tokens for strings and regexps #50
Conversation
Signed-off-by: Denys Smirnov <[email protected]>
👍 If I understood the change, it boils down to keeping whole literals in Code: string literal
and same for @dennwc could you please help me understand, how/if we want it to be consistent with behavior of other drivers? On
not sure which issue is that. On |
@bzz Other drivers already include quotes in As for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
Signed-off-by: Denys Smirnov <[email protected]>
Currently, JS driver uses unescaped string and regexp literals from the native AST as
@token
. This leads to confusion for ML, since they expect string token to cover the whole node in the source code (according to the positional information).Although in general, this will require adding a separate "token stream" to the UAST, those two issues can be solved in the current version.
See comments in related issues for details (link is in the commit message).