mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
1326454 - Add assertions to TokenStream::skipChars{,IgnoreEOL} verifying EOF isn't yet hit and that newlines aren't skipped, if appropriate.
This commit is contained in:
parent
a91f1769b7
commit
6828c2c09b
1 changed files with 8 additions and 3 deletions
|
|
@ -997,13 +997,18 @@ class MOZ_STACK_CLASS TokenStream
|
|||
}
|
||||
|
||||
void skipChars(uint8_t n) {
|
||||
while (n-- > 0)
|
||||
getChar();
|
||||
while (n-- > 0) {
|
||||
MOZ_ASSERT(userbuf.hasRawChars());
|
||||
mozilla::DebugOnly<int32_t> c = getCharIgnoreEOL();
|
||||
MOZ_ASSERT(c != '\n');
|
||||
}
|
||||
}
|
||||
|
||||
void skipCharsIgnoreEOL(uint8_t n) {
|
||||
while (n-- > 0)
|
||||
while (n-- > 0) {
|
||||
MOZ_ASSERT(userbuf.hasRawChars());
|
||||
getCharIgnoreEOL();
|
||||
}
|
||||
}
|
||||
|
||||
void updateLineInfoForEOL();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue