1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibJS: Support all line terminators (LF, CR, LS, PS)

https://tc39.es/ecma262/#sec-line-terminators
This commit is contained in:
Linus Groh 2020-10-21 22:16:45 +01:00 committed by Andreas Kling
parent 5043c4a3e5
commit 15642874f3
Notes: sideshowbarker 2024-07-19 01:49:17 +09:00
8 changed files with 161 additions and 29 deletions

View file

@ -47,6 +47,7 @@ private:
bool consume_hexadecimal_number();
bool consume_binary_number();
bool is_eof() const;
bool is_line_terminator() const;
bool is_identifier_start() const;
bool is_identifier_middle() const;
bool is_line_comment_start() const;
@ -61,7 +62,7 @@ private:
StringView m_source;
size_t m_position { 0 };
Token m_current_token;
int m_current_char { 0 };
char m_current_char { 0 };
size_t m_line_number { 1 };
size_t m_line_column { 0 };