Skip to content
Permalink
Browse files

Merge pull request #681 from krekoten/dynamic_string_parsing

Lexer should not double hash sign
  • Loading branch information
alex committed May 6, 2013
2 parents d43a598 + 5602e61 commit dcb62828c1b877d2069534b772fe35a0f436af02
Showing with 4 additions and 5 deletions.
  1. +3 −3 spec/tags/core/kernel/chop_tags.txt
  2. +1 −0 tests/test_parser.py
  3. +0 −2 topaz/lexer.py
@@ -1,5 +1,5 @@
fails:Kernel.chop removes the final character of $_
fails:Kernel.chop removes the final carriage return, newline of $_
fails:##chop is a private method
fails:##chop removes the final character of $_
fails:##chop removes the final carriage return, newline of $_
fails:#chop is a private method
fails:#chop removes the final character of $_
fails:#chop removes the final carriage return, newline of $_
@@ -1087,6 +1087,7 @@ def test_dynamic_string(self, space):
assert space.parse('"\w"') == const_string("w")
assert space.parse('"\M-a"') == const_string("\xe1")
assert space.parse('"#$abc#@a#@@ab"') == dyn_string(ast.Global("$abc"), ast.InstanceVariable("@a"), ast.ClassVariable("@@ab", 1))
assert space.parse('"#test"') == const_string("#test")

def test_percent_terms(self, space):
const_string = lambda strvalue: ast.Main(ast.Block([
@@ -1280,8 +1280,6 @@ def next(self):
elif ch == "{":
self.lexer.add(ch)
return self.lexer.emit("STRING_DBEG")
else:
self.lexer.add("#")
self.lexer.unread()

while True:

0 comments on commit dcb6282

Please sign in to comment.
You can’t perform that action at this time.