mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Issue #1894 - Part 2: Implement support for nullish coalescing in the JS parser
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1566141
This commit is contained in:
parent
3efa23472c
commit
d7cdeaf313
8 changed files with 119 additions and 44 deletions
|
|
@ -1260,8 +1260,8 @@ enum FirstCharKind {
|
|||
LastCharKind = Other
|
||||
};
|
||||
|
||||
// OneChar: 40, 41, 44, 58, 59, 63, 91, 93, 123, 125, 126:
|
||||
// '(', ')', ',', ':', ';', '?', '[', ']', '{', '}', '~'
|
||||
// OneChar: 40, 41, 44, 58, 59, 91, 93, 123, 125, 126:
|
||||
// '(', ')', ',', ':', ';', '[', ']', '{', '}', '~'
|
||||
// Ident: 36, 65..90, 95, 97..122: '$', 'A'..'Z', '_', 'a'..'z'
|
||||
// Dot: 46: '.'
|
||||
// Equals: 61: '='
|
||||
|
|
@ -1811,7 +1811,7 @@ TokenStream::getTokenInternal(TokenKind* ttp, Modifier modifier)
|
|||
tp->type = TOK_OPTCHAIN;
|
||||
}
|
||||
} else {
|
||||
tp->type = TOK_HOOK;
|
||||
tp->type = matchChar('?') ? TOK_COALESCE : TOK_HOOK;
|
||||
}
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue