X-Git-Url: https://code.kerkeslager.com/?p=fur;a=blobdiff_plain;f=tokenization.py;fp=tokenization.py;h=1a2653e3c0dc93d6c1208357d29d703b788eadac;hp=a736912603e0832efc974b07252cf03ebe6fdc38;hb=6e7ba75736ca8b463a263e7d58aa8f6bff62faaf;hpb=b8839fd25de742a5846a7189f761f591aa4689a9 diff --git a/tokenization.py b/tokenization.py index a736912..1a2653e 100644 --- a/tokenization.py +++ b/tokenization.py @@ -31,13 +31,13 @@ def _make_token_matcher(definition): return token_matcher - _TOKEN_MATCHERS = [ + ('keyword', r'(def|end)(?![a-z_])'), ('open_parenthese', r'\('), ('close_parenthese', r'\)'), ('comma', r','), ('integer_literal', r'\d+'), - ('symbol', r'[a-z]+'), + ('symbol', r'[a-z_]+'), ('single_quoted_string_literal', r"'.*?'"), ('comparison_level_operator', r'(<=|>=|==|!=|<|>)'), ('assignment_operator', r'='),