diff options
author | Matthew Sotoudeh <matthew@masot.net> | 2024-03-10 21:48:48 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthew@masot.net> | 2024-03-10 21:48:48 -0700 |
commit | 6ef3a3a359c33bbb69a1b627598593f6cb7a93eb (patch) | |
tree | 318f83b98fc31d609b97c6c56626bcdfb6ea02f0 | |
parent | 379a64bd56a53ac7e2e24d4e13b0076476336ef2 (diff) |
more clang support
-rw-r--r-- | gamma/lexer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gamma/lexer.py b/gamma/lexer.py index 66cd521..1c49434 100644 --- a/gamma/lexer.py +++ b/gamma/lexer.py @@ -10,11 +10,11 @@ class Token: RULES = { "preproc": r'^#([^\n]|[\\][\n])*?\n', - "op": r"[\-][>]|\+\+|<<|>>|--|==|&&|[<>!+\-*/&|^](=?)|[,(){};.=:&|~%?]|\[|\]", + "op": r"[\-][>]|\+\+|<<|>>|--|==|(\|\|)|&&|[<>!+\-*/&|^](=?)|[,(){};.=:&|~%?]|\[|\]", "dots": r"\.\.\.", "ident": "[a-zA-Z_][a-zA-Z0-9_]*", "strify": r'#[a-zA-Z_]+', - "numlit": "((0x[0-9a-fA-F]*)|([0-9]*))(\.((0x[0-9a-fA-F]*)|([0-9]*)))?", + "numlit": "((0x[0-9a-fA-F]*)|([0-9]*))(\.((0x[0-9a-fA-F]*)|([0-9]*)))*", "strlit": r'["]([\\]["]|[^"][^"])*[^"]?["]', "chrlit": r"[']([\\][']|[^'][^'])*[^']?[']", "_slc": r'//[^\n]*', |