Class: Mirah::AST::RestArgument
- Defined in:
- lib/mirah/ast/method.rb
Instance Attribute Summary
Attributes included from Named
Attributes included from Typed
Attributes inherited from Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
- #infer(typer, expression) ⇒ Object
-
#initialize(parent, line_number, name) ⇒ RestArgument
constructor
A new instance of RestArgument.
Methods included from Scoped
Methods included from Named
#string_value, #to_s, #validate_name
Methods inherited from Argument
Methods inherited from Node
#<<, ===, #[], #[]=, #_dump, _load, #_set_parent, child, child_name, #child_nodes, #each, #empty?, #expr?, #inferred_type!, #initialize_copy, #insert, #inspect, #inspect_children, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #string_value, #temp, #to_s, #top_level?, #validate_child, #validate_children
Constructor Details
#initialize(parent, line_number, name) ⇒ RestArgument
Returns a new instance of RestArgument.
178 179 180 181 182 |
# File 'lib/mirah/ast/method.rb', line 178 def initialize(parent, line_number, name) super(parent, line_number) self.name = name end |
Instance Method Details
#infer(typer, expression) ⇒ Object
184 185 186 187 |
# File 'lib/mirah/ast/method.rb', line 184 def infer(typer, expression) scope.static_scope << name super end |