Support typedef names redeclared to identifiers in inner scopes
diff --git a/tests/test_c_lexer.py b/tests/test_c_lexer.py
index 790ab39..29065e2 100644
--- a/tests/test_c_lexer.py
+++ b/tests/test_c_lexer.py
@@ -22,6 +22,12 @@
def error_func(self, msg, line, column):
self.fail(msg)
+ def on_lbrace_func(self):
+ pass
+
+ def on_rbrace_func(self):
+ pass
+
def type_lookup_func(self, typ):
if typ.startswith('mytype'):
return True
@@ -29,7 +35,8 @@
return False
def setUp(self):
- self.clex = CLexer(self.error_func, self.type_lookup_func)
+ self.clex = CLexer(self.error_func, self.on_lbrace_func,
+ self.on_rbrace_func, self.type_lookup_func)
self.clex.build(optimize=False)
def assertTokensTypes(self, str, types):
@@ -331,11 +338,18 @@
def error_func(self, msg, line, column):
self.error = msg
+ def on_lbrace_func(self):
+ pass
+
+ def on_rbrace_func(self):
+ pass
+
def type_lookup_func(self, typ):
return False
def setUp(self):
- self.clex = CLexer(self.error_func, self.type_lookup_func)
+ self.clex = CLexer(self.error_func, self.on_lbrace_func,
+ self.on_rbrace_func, self.type_lookup_func)
self.clex.build(optimize=False)
self.error = ""