Jordan Rose
fc9ea1e329
Add Lexer::IsHashbangAllowed, drop SourceManager::getHashbangBufferID ( #18534 )
...
Having this be a single buffer hardcoded in the SourceManager and set
by all clients is silly. SourceFiles with the 'Main' kind are allowed
to have hashbang lines (`#!`), other files are not. And anyone
manually setting up a Lexer can decide for themselves.
No intended behavioral change.
2018-08-07 08:25:05 -07:00
omochimetaru
ebd5323b42
[Syntax] add UTF-8 BOM support to libSyntax
2017-12-28 01:26:09 +09:00
omochimetaru
f86e1c8201
[Parse] add CRLF support in lexTrivia
2017-12-21 14:27:13 +09:00
Rintaro Ishizaki
cc72a3b934
[Lexer] Use ContentStart position for hashbang trivia
2017-12-19 09:24:34 +09:00
Rintaro Ishizaki
2c06060165
[Syntax] Add CarriageReturn trivia kind
...
To distinguish '\r' from '\n'.
2017-12-19 09:24:34 +09:00
Rintaro Ishizaki
181333ce0f
[Lexer] Lex conflict marker as a trivia
2017-12-19 09:24:33 +09:00
Rintaro Ishizaki
475bb56228
[Syntax] Add test case for hashbang trivia in Lexer
2017-12-19 09:14:20 +09:00
Rintaro Ishizaki
b4e7f74ab4
[Syntax] Add dedicated unittest for Lexer with trivia parsing
2017-12-19 09:14:20 +09:00