Class: RLSL::Prism::IR::FunctionDefinition
- Defined in:
- lib/rlsl/prism/ir/definitions.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#param_types ⇒ Object
Returns the value of attribute param_types.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#return_type ⇒ Object
Returns the value of attribute return_type.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(name, params, body, return_type: nil, param_types: {}) ⇒ FunctionDefinition
constructor
A new instance of FunctionDefinition.
Methods inherited from Node
Constructor Details
#initialize(name, params, body, return_type: nil, param_types: {}) ⇒ FunctionDefinition
Returns a new instance of FunctionDefinition.
30 31 32 33 34 35 36 37 38 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 30 def initialize(name, params, body, return_type: nil, param_types: {}) super() @name = name @params = params @body = body @return_type = return_type @param_types = param_types @type = return_type end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
25 26 27 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 25 def body @body end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 25 def name @name end |
#param_types ⇒ Object
Returns the value of attribute param_types.
26 27 28 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 26 def param_types @param_types end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
25 26 27 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 25 def params @params end |
#return_type ⇒ Object
Returns the value of attribute return_type.
26 27 28 |
# File 'lib/rlsl/prism/ir/definitions.rb', line 26 def return_type @return_type end |