Class: Mirah::AST::AccessLevel
- Includes:
- ClassScoped, Named
- Defined in:
- lib/mirah/ast/class.rb,
lib/mirah/compiler/class.rb
Instance Attribute Summary
Attributes included from Named
Attributes inherited from Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
- #compile(compiler, expression) ⇒ Object
- #infer(typer, expression) ⇒ Object
-
#initialize(parent, line_number, name) ⇒ AccessLevel
constructor
A new instance of AccessLevel.
Methods included from Named
#string_value, #to_s, #validate_name
Methods included from ClassScoped
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) ⇒ AccessLevel
Returns a new instance of AccessLevel.
305 306 307 308 309 |
# File 'lib/mirah/ast/class.rb', line 305 def initialize(parent, line_number, name) super(parent, line_number) self.name = name class_scope.current_access_level = name.to_sym end |
Instance Method Details
#compile(compiler, expression) ⇒ Object
35 |
# File 'lib/mirah/compiler/class.rb', line 35 def compile(compiler, expression); end |
#infer(typer, expression) ⇒ Object
311 312 313 |
# File 'lib/mirah/ast/class.rb', line 311 def infer(typer, expression) typer.no_type end |