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:
parent
5043c4a3e5
commit
15642874f3
Notes:
sideshowbarker
2024-07-19 01:49:17 +09:00
Author: https://github.com/linusg
Commit: 15642874f3
Pull-request: https://github.com/SerenityOS/serenity/pull/3815
Reviewed-by: https://github.com/alimpfard
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