Commit 0c7e757c authored by Robert Bradshaw's avatar Robert Bradshaw

structs, enums, and fused

parent c9090ce2
......@@ -150,6 +150,12 @@ address: '&' factor
cast: '<' type ['?'] '>' factor
size_of: 'sizeof' '(' (type) ')'
cdef_stmt: ('cdef' | 'cpdef') (classdef | cdef_decl)
ctypedef_stmt: 'ctypedef' cdef_decl
cdef_stmt: ('cdef' | 'cpdef') (classdef | cdef_decl | struct | enum | fused)
ctypedef_stmt: 'ctypedef' (cdef_decl | struct | enum)
cdef_decl: type NAME NEWLINE
struct: ('struct' | 'union') NAME (NEWLINE | (':' struct_suite))
struct_suite: NEWLINE INDENT (cdef_decl* | pass_stmt NEWLINE)+ DEDENT
enum: 'enum' [NAME] (NEWLINE | ':' enum_suite)
enum_suite: NEWLINE INDENT (NAME ['=' NUMBER] NEWLINE | pass_stmt NEWLINE)+ DEDENT
fused: 'fused' NAME ':' NEWLINE INDENT ( type NEWLINE)+ DEDENT
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