From 3e56bc1d6005c4fa9c9e8cd14edca8db2fd89a47 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Sat, 4 Aug 2018 15:59:24 -0400 Subject: [PATCH] Include numbers in valid identifier characters Fixes #27. --- parser/src/lexer.rs | 2 +- tests/{not_yet_working => snippets}/function_args.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/{not_yet_working => snippets}/function_args.py (100%) diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index 5f53524f4..0a90f93b2 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -221,7 +221,7 @@ impl<'input> Lexer<'input> { fn is_char(&self) -> bool { match self.chr0 { - Some('a'...'z') | Some('A'...'Z') | Some('_') => return true, + Some('a'...'z') | Some('A'...'Z') | Some('_') | Some('0'...'9') => return true, _ => return false, } } diff --git a/tests/not_yet_working/function_args.py b/tests/snippets/function_args.py similarity index 100% rename from tests/not_yet_working/function_args.py rename to tests/snippets/function_args.py