Skip to content

Commit

Permalink
fix parsing $;
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 21, 2013
1 parent 70a9015 commit 18e888e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/test_parser.py
Expand Up @@ -2110,6 +2110,7 @@ def test_global_var(self, space):
assert space.parse("$,") == simple_global("$,") assert space.parse("$,") == simple_global("$,")
assert space.parse("$-w") == simple_global("$-w") assert space.parse("$-w") == simple_global("$-w")
assert space.parse("$@") == simple_global("$@") assert space.parse("$@") == simple_global("$@")
assert space.parse("$;") == simple_global("$;")


def test_comments(self, space): def test_comments(self, space):
r = space.parse(""" r = space.parse("""
Expand Down
2 changes: 1 addition & 1 deletion topaz/lexer.py
Expand Up @@ -533,7 +533,7 @@ def dollar(self, ch):
self.add(ch) self.add(ch)
self.state = self.EXPR_END self.state = self.EXPR_END
ch = self.read() ch = self.read()
if ch in "$>:?\\!\"~&`'+/,@": if ch in "$>:?\\!\"~&`'+/,@;":
self.add(ch) self.add(ch)
yield self.emit("GVAR") yield self.emit("GVAR")
elif ch == "-" and self.peek().isalnum(): elif ch == "-" and self.peek().isalnum():
Expand Down

0 comments on commit 18e888e

Please sign in to comment.