-
Notifications
You must be signed in to change notification settings - Fork 15
semantic: string literal escape sequence handing #111
Comments
There are total 57
All need to be double-checked and taken care of under this issue as most probably have the same root cause (string decoding, similar to bblfsh/javascript-driver#62) |
Java, in comparison to other languages, seems to have a well-defined and limited number of special escapes for character and string literals: So only the next cases seem to be different with Go:
(Does not matter, but interesting fact: 3-digit octal in Java can only start with 0 to 3 🤷♂️) All this means that a simple solution may actually be plausible here. |
That's because Java defines "byte" as an octet. In C, where a |
Now native Java AST contains both - escapedValue - unescapedValue obtained from JDT parser. That is similar to what javasript driver does and allows to avoid having language-spacific escape sequence handling on the Go side that can be different from Go one. See bblfsh#111 (comment) for details. Signed-off-by: Alexander Bezzubov <[email protected]>
Discovered as part of the bblfsh/bblfshd#268 (comment)
Driver fails to parse e.g this file with
check: key "escapedValue": invalid syntax ("\0")"
Normalization mapping for semantic mode needs to be updated.
The text was updated successfully, but these errors were encountered: