summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-06-12 14:28:00 -0700
committerTim Foley <tfoley@nvidia.com>2017-06-12 14:33:52 -0700
commite95b6312b6cecd6073f801ad1c9a7ab11d50dfc3 (patch)
tree1eeff8e3fc388bf6b1f3aba25c9c7c7cbd609e1c /tests
parentb53041b187818186be862b411469f24919908f07 (diff)
Lexer: handle escaped newlines
This is mostly to allow for the idiomatic style of defining a multi-line macro in C: #define FOO(a,b) \ x(a) \ y(b) \ /* end */ The handling is reasonably general: in the lexer whenever we need to consume or "peek" the next code point, we check if we are at the start of a backslash-newline sequence, and if so we skip past that to find what we were looking for. However, the way I'm handling things right now there is no step taken to "clean" a token and remove the backslash or newline from its value, so downstream code that actually inspects token values will probably break if users start putting escaped newlines in the middle of names. We can fix that issue when (if) it comes up.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions