mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibJS: Support all line terminators (LF, CR, LS, PS)
https://tc39.es/ecma262/#sec-line-terminators
This commit is contained in:
parent
5043c4a3e5
commit
15642874f3
8 changed files with 161 additions and 29 deletions
|
@ -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 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue