These are chat archives for ChaiScript/ChaiScript

18th
Feb 2018
StanEpp
@StanEpp
Feb 18 2018 16:31
@lefticus Does Chaiscript only support ASCII characters? Therefore the unicode escape sequence only supports the range '\u0000' to '\u00FF'?
StanEpp
@StanEpp
Feb 18 2018 18:03
I started a kate syntax highlighting description, so I can finally have some highlighting in QtCreator :) https://github.com/StanEpp/Chaiscript-Kate-Syntax-Highlighting
Jason Turner
@lefticus
Feb 18 2018 18:39
there are some patches in thee to make sure unicode is supported, but I've never used it myself. Let's see
Those are the three tests that are currently run (and pass) @StanEpp
StanEpp
@StanEpp
Feb 18 2018 19:07
I saw them, but I was wondering why these two lines behave differently:
print("\uc39c") // prints "Ü"
print('\uc39c') // Error: "Single-quoted strings must be 1 character long" during evaluation at (40, 19)
But
print('\u00FF')
works fine
As soon as the number is higher than FF the single quoted unicode escape sequence fails
Jason Turner
@lefticus
Feb 18 2018 20:58
I'm sure that's just a bug in the char parser
Oh, yeah, because it wouldn't be a single C++ style char anymore
and with the way ChaiScript is built '\u00FF'must return a char and "\u00FF" must return an std::string
there was discussion a long time ago about letting the programmer choose which version of std::string and which char is used
StanEpp
@StanEpp
Feb 18 2018 21:19
Ahh, you're right. I missed that detail. It needs to return a char therefore the limit of FF. Thanks!