Commit 760788f7 authored by Stefan Behnel's avatar Stefan Behnel

Intern all identifier strings in the parser.

parent a8d7ccd2
...@@ -65,7 +65,7 @@ class Ctx(object): ...@@ -65,7 +65,7 @@ class Ctx(object):
def p_ident(s, message="Expected an identifier"): def p_ident(s, message="Expected an identifier"):
if s.sy == 'IDENT': if s.sy == 'IDENT':
name = s.systring name = s.context.intern_ustring(s.systring)
s.next() s.next()
return name return name
else: else:
...@@ -74,7 +74,7 @@ def p_ident(s, message="Expected an identifier"): ...@@ -74,7 +74,7 @@ def p_ident(s, message="Expected an identifier"):
def p_ident_list(s): def p_ident_list(s):
names = [] names = []
while s.sy == 'IDENT': while s.sy == 'IDENT':
names.append(s.systring) names.append(s.context.intern_ustring(s.systring))
s.next() s.next()
if s.sy != ',': if s.sy != ',':
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment