mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-01 12:20:02 +00:00
Fixed prettyasserts.py getting confused by escaped-newlines
This is just a messy part of the C grammar. Also fixed >> and << confusing certain assert expressions, which isn't surprising.
This commit is contained in:
@ -31,7 +31,7 @@ CMP = {
|
||||
}
|
||||
|
||||
LEXEMES = {
|
||||
'ws': [r'(?:\s|\n|#.*?\n|//.*?\n|/\*.*?\*/)+'],
|
||||
'ws': [r'(?:\s|\n|#.*?(?<!\\)\n|//.*?(?<!\\)\n|/\*.*?\*/)+'],
|
||||
'assert': ['assert'],
|
||||
'arrow': ['=>'],
|
||||
'string': [r'"(?:\\.|[^"])*"', r"'(?:\\.|[^'])\'"],
|
||||
@ -39,7 +39,7 @@ LEXEMES = {
|
||||
'cmp': CMP.keys(),
|
||||
'logic': ['\&\&', '\|\|'],
|
||||
'sep': [':', ';', '\{', '\}', ','],
|
||||
'op': ['->'], # specifically ops that conflict with cmp
|
||||
'op': ['->', '>>', '<<'], # specifically ops that conflict with cmp
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user