mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +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
|
@ -262,4 +262,9 @@ bool Token::is_identifier_name() const
|
|||
|| m_type == TokenType::Yield;
|
||||
}
|
||||
|
||||
bool Token::trivia_contains_line_terminator() const
|
||||
{
|
||||
return m_trivia.contains('\n') || m_trivia.contains('\r') || m_trivia.contains(LINE_SEPARATOR) || m_trivia.contains(PARAGRAPH_SEPARATOR);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue