Commit deb408cc authored by di68kap's avatar di68kap

- Some small refactorings

parent 8fdcd1ba
This diff is collapsed.
......@@ -368,8 +368,8 @@ class TestSynonymDetection:
b = /b/
"""
grammar = grammar_provider(ebnf)()
assert grammar['a'].name == 'a', grammar['a'].name
assert grammar['b'].name == 'b', grammar['b'].name
assert grammar['a'].pname == 'a', grammar['a'].pname
assert grammar['b'].pname == 'b', grammar['b'].pname
assert grammar('b').as_sxpr().count('b') == 2
......
......@@ -45,7 +45,7 @@ class TestParserClass:
gr = grammar_provider(minilang)()
l = []
def visitor(p: Parser):
l.append(p.name + p.ptype)
l.append(p.pname + p.ptype)
gr.root__.apply(visitor)
s1 = ", ".join(l)
l = []
......
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