Class: Rubex::AST::Statement::CPtrFuncDecl
- Defined in:
- lib/rubex/ast/statement/c_ptr_decl/c_ptr_func_decl.rb
Instance Attribute Summary
Attributes inherited from CPtrDecl
Attributes inherited from Base
Instance Method Summary collapse
- #analyse_statement(local_scope, extern: false) ⇒ Object
-
#initialize(type, name, value, ptr_level, location) ⇒ CPtrFuncDecl
constructor
A new instance of CPtrFuncDecl.
Methods inherited from CPtrDecl
#generate_code, #rescan_declarations
Methods inherited from Base
#==, #generate_code, #statement?
Constructor Details
#initialize(type, name, value, ptr_level, location) ⇒ CPtrFuncDecl
Returns a new instance of CPtrFuncDecl.
5 6 7 |
# File 'lib/rubex/ast/statement/c_ptr_decl/c_ptr_func_decl.rb', line 5 def initialize(type, name, value, ptr_level, location) super end |
Instance Method Details
#analyse_statement(local_scope, extern: false) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rubex/ast/statement/c_ptr_decl/c_ptr_func_decl.rb', line 9 def analyse_statement(local_scope, extern: false) cptr_cname extern ident = @type[:ident] ident[:arg_list].analyse_statement(local_scope) @type = DataType::CFunction.new( @name, @c_name, ident[:arg_list], Helpers.determine_dtype(@type[:dtype], ident[:return_ptr_level]), nil ) super end |