diff options
author | Melody Horn <melody@boringcactus.com> | 2020-11-04 14:38:39 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-11-04 14:38:39 -0700 |
commit | 68c303c285032e2f0398352b70eb79736a72296f (patch) | |
tree | 8d283c7c12b4db0570073423cdfe0e5a2fba336e /crowbar_reference_compiler/scanner.py | |
parent | ab58859a49b819954fddd00d6364c56ca4dc651a (diff) | |
download | reference-compiler-68c303c285032e2f0398352b70eb79736a72296f.tar.gz reference-compiler-68c303c285032e2f0398352b70eb79736a72296f.zip |
add ability to extract declarations from file
Diffstat (limited to 'crowbar_reference_compiler/scanner.py')
-rw-r--r-- | crowbar_reference_compiler/scanner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crowbar_reference_compiler/scanner.py b/crowbar_reference_compiler/scanner.py index 1d846f3..abf274b 100644 --- a/crowbar_reference_compiler/scanner.py +++ b/crowbar_reference_compiler/scanner.py @@ -49,7 +49,7 @@ HEX_FLOAT_CONSTANT = re.compile(r"0(fx|FX)[0-9a-fA-F_]+\.[0-9a-fA-F_]+[pP][+-]?[ _ESCAPE_SEQUENCE = r"""\\['"\\rnt0]|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""" CHAR_CONSTANT = re.compile(r"'([^'\\]|" + _ESCAPE_SEQUENCE + r")'") STRING_LITERAL = re.compile(r'"([^"\\]|' + _ESCAPE_SEQUENCE + r')+"') -PUNCTUATOR = re.compile(r"->|\+\+|--|>>|<<|<=|>=|&&|\|\||[=!+\-*/%&|^]=|[\[\](){}.,+\-*/%;!&|^~><=]") +PUNCTUATOR = re.compile(r"->|\+\+|--|>>|<<|<=|>=|&&|\|\||[=!+\-*/%&|^]=|[\[\](){}.,+\-*/%;:!&|^~><=]") WHITESPACE = re.compile(r"[\p{Z}\p{Cc}]+") COMMENT = re.compile(r"(//[^\n]*\n)|(/\*.*?\*/)", re.DOTALL) |