reference type added and very basic pass by reference works in CGenerator. Much more work to go to make sure complicated cases work and return by reference
This commit is contained in:
@@ -2,7 +2,8 @@ Goal = translation_unit ;
|
||||
translation_unit = WS unorderd_list_part WS ;
|
||||
unorderd_list_part = import WS unorderd_list_part | function WS unorderd_list_part | type_def line_end WS unorderd_list_part | if_comp WS unorderd_list_part | simple_passthrough WS unorderd_list_part | declaration_statement line_end WS unorderd_list_part | import | function | type_def line_end | if_comp | simple_passthrough | declaration_statement line_end ;
|
||||
|
||||
type = "\*" WS type | "void" | "int" | "float" | "double" | "char" | scoped_identifier | scoped_identifier WS template_inst | function_type ;
|
||||
type = "ref" WS pre_reffed | pre_reffed ;
|
||||
pre_reffed = "\*" WS pre_reffed | "void" | "int" | "float" | "double" | "char" | scoped_identifier | scoped_identifier WS template_inst | function_type ;
|
||||
function_type = "fun" WS "\(" WS opt_type_list WS "\)" WS ":" WS type ;
|
||||
dec_type = ":" WS type ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user