-
Notifications
You must be signed in to change notification settings - Fork 13
Parsing fails on valid JS: string literal with \0 #62
Comments
The issue comes from func TestUnquoteSingle(T *testing.T) {
s, err := unquoteSingle(`'\0'`)
require.NoError(T, err)
} which results in From original PR discussion #50 (comment)
|
The cause is an error from strconv.UnquoteChar(`'\0'`, '\'')` in this clause |
Seems to be related to the difference how
A proposed solution includes converting Current implementation of Op
|
That seems reasonable. The details of how we handle unquoting are private to the implementation, so if we have to do some patch-work it shouldn't break anything fundamental. Unfortunately there are a lot of subtle variations in (un)escaping rules for string literals, and the desire to lean on Go's implementation is understandable but doesn't always line up correctly with other languages. 🙍🏻♀️ |
Parsing
string.js
file with contentresults in
Found though #54
Steps to reproduce
The text was updated successfully, but these errors were encountered: