Replies: 2 comments
-
Answering my own question here, you have to use the |
Beta Was this translation helpful? Give feedback.
0 replies
-
i think the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently embarked on rewriting my scanner from C++ to C (see PR: tlaplus-community/tree-sitter-tlaplus#99). This was mostly a smooth process but then I hit an issue that I recall actually originally led me to use C++ instead: MSVC on Windows treats Unicode character literals differently than GCC or LLVM do. You can see this in this CI run, where the tests only fail on Windows and only the Unicode tests that touch the external scanner fail: https://github.com/tlaplus-community/tree-sitter-tlaplus/actions/runs/8257874149/job/22589163178?pr=99
So how does one write C code that handles Unicode character literals in a cross-platform way? For example, here is a line of code that works how you'd expect on macOS/Linux (LLVM and GCC) but not Windows & MSVC:
Beta Was this translation helpful? Give feedback.
All reactions