From: David Kerkeslager Date: Mon, 14 Aug 2017 06:34:41 +0000 (-0400) Subject: Make "do" a keyword X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=ad72a3204cb66766dcebb847b42512494199d15a;p=fur Make "do" a keyword --- diff --git a/parsing.py b/parsing.py index b2a14a8..e2bd9d0 100644 --- a/parsing.py +++ b/parsing.py @@ -399,7 +399,7 @@ def _function_definition_statement_parser(index, tokens): tokens[index].line, )) - if tokens[index].type == 'symbol' and tokens[index].match == 'do': + if tokens[index].match == 'do': index += 1 else: return failure diff --git a/tokenization.py b/tokenization.py index 3c4dc6f..914d05a 100644 --- a/tokenization.py +++ b/tokenization.py @@ -32,7 +32,7 @@ def _make_token_matcher(definition): return token_matcher _TOKEN_MATCHERS = [ - ('keyword', r'(def|end)(?![a-z_])'), + ('keyword', r'(def|do|end)(?![a-z_])'), ('open_parenthese', r'\('), ('close_parenthese', r'\)'), ('comma', r','),