diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-06-19 14:13:55 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-06-19 14:13:55 -0700 |
| commit | e65d2ad1e776610427b85dd20e861d3ad5e0ea71 (patch) | |
| tree | 2693987d8cbac64369b30857f6a6b8e6d78cd903 /source/slang/check.cpp | |
| parent | 838e8331da24744948539c12d2a8edcd9c594ee5 (diff) | |
Bug fix for newline escaping.
The previous changes had left out logic for "scrubbing" a token value that includes an escaped newline, because I expected it would only occur within whitespace. Unfortunately, some user code looked like this:
```
a + b
```
That is, there was a token at the very start of the line, after the escaped newline.
As a result, after consuming the leading whitespace (which didn't end up consuming the escaped newline - but we could consider making it do so in future), the lexer started to lex a token that *starts* with an escaped newline, but turns out to be an identifer (which gets an invalid name).
This change adds some ad-hoc code to "scrub" the value of *every* token, which wasteful but at least solves the problem.
Diffstat (limited to 'source/slang/check.cpp')
0 files changed, 0 insertions, 0 deletions
