Commit df97615f authored by gsamain's avatar gsamain

Initial cypclass support in parsing

parent 60a34f51
...@@ -2257,8 +2257,8 @@ def p_statement(s, ctx, first_statement = 0): ...@@ -2257,8 +2257,8 @@ def p_statement(s, ctx, first_statement = 0):
cdef_flag = 1 cdef_flag = 1
nogil_flag = 1 nogil_flag = 1
s.next() s.next()
if s.sy != "class": if s.systring not in ("class", "cppclass"):
s.error('ccdef statement only allowed for extension type') s.error('ccdef statement only allowed for extension type or cppclass')
elif s.sy == 'cpdef': elif s.sy == 'cpdef':
s.level = ctx.level s.level = ctx.level
cdef_flag = 1 cdef_flag = 1
...@@ -3813,7 +3813,7 @@ def p_cpp_class_definition(s, pos, ctx): ...@@ -3813,7 +3813,7 @@ def p_cpp_class_definition(s, pos, ctx):
visibility = ctx.visibility, visibility = ctx.visibility,
in_pxd = ctx.level == 'module_pxd', in_pxd = ctx.level == 'module_pxd',
attributes = attributes, attributes = attributes,
templates = templates) templates = templates, cypclass=nogil)
def p_cpp_class_attribute(s, ctx): def p_cpp_class_attribute(s, ctx):
decorators = None decorators = None
......
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