X-Git-Url: https://code.kerkeslager.com/?a=blobdiff_plain;f=tokenization.py;h=bc8cf85a8f5a12aa556095f905bb190ef292c446;hb=61733d6070859e6a639ae4b34faec9aacca52a29;hp=e12b8ec718680018e8d3f44d2324fe335eaf6558;hpb=3297817843cd6bd087505a70d8e108f1baa35cff;p=fur diff --git a/tokenization.py b/tokenization.py index e12b8ec..bc8cf85 100644 --- a/tokenization.py +++ b/tokenization.py @@ -38,12 +38,15 @@ _TOKEN_MATCHERS = [ ('open_parenthese', r'\('), ('close_parenthese', r'\)'), ('comma', r','), + ('colon', r':'), + ('period', r'\.'), ('integer_literal', r'\d+'), ('symbol', r'[a-z_]+'), ('single_quoted_string_literal', r"'.*?'"), + ('double_quoted_string_literal', r'".*?"'), ('comparison_level_operator', r'(<=|>=|==|!=|<|>)'), ('assignment_operator', r'='), - ('addition_level_operator', r'(\+|-)'), + ('addition_level_operator', r'(\+\+|\+|-)'), ('multiplication_level_operator', r'(\*|//|%)'), ('newline', r'\n'), ]