orchestr7 / ktoml

Kotlin Multiplatform parser and compile-time serializer/deserializer for TOML format (Native, JS, JVM) based on KxS
https://akuleshov7.github.io/ktoml
MIT License
449 stars 23 forks source link

Literal strings: in rare cases escaped symbols are incorrectly parsed #177

Closed orchestr7 closed 1 year ago

orchestr7 commented 1 year ago

It should be a regression, but following literal strings are parsed as basic strings (double quoted):

# What you see is what you get.
winpath  = 'C:\Users\nodejs\templates'
winpath2 = '\\ServerX\admin$\system32\'
quoted   = 'Tom "Dubs" Preston-Werner'
regex    = '<\i\c*\s*>'

We continue to escape symbols in the same way as these strings are basic strings: "\t" and that is quite confusing...

orchestr7 commented 1 year ago

We also need to think about Char type in this case, because I want Char to be decoded from a single quoted string

orchestr7 commented 1 year ago

It's appeared my understanding was incorrect, closing after adding a test