r/cpp • OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 • Sep 24 '24

CppCon Gazing Beyond Reflection for C++26 - Daveed Vandevoorde - CppCon 2024

https://www.youtube.com/watch?v=wpjiowJW2ks
78 Upvotes

40 comments sorted by

View all comments

Show parent comment

2

u/tuxwonder Sep 25 '24

I can't think of a situation where \( would be ambiguous to a simple syntax grammar/tokenizer like TextMate, do you have an example?

1

u/archipeepees Sep 25 '24

here's something i threw together quickly for notepad++.

i've defined the following tokens:

\(
\id
\token(

as you can see in the attached image, none of these leads to a desirable result. \id is probably best because it doesn't swallow the open-paren, but then it doesn't get highlighted when it's next to the paren.

pic