Class: Kumi::Core::RubyParser::DeclarationReferenceProxy
- Inherits:
-
Object
- Object
- Kumi::Core::RubyParser::DeclarationReferenceProxy
- Extended by:
- Sugar::ProxyRefinement
- Includes:
- Syntax
- Defined in:
- lib/kumi/core/ruby_parser/declaration_reference_proxy.rb
Overview
DSL proxy for declaration references (traits and values) Handles references to declared items and field access on them
Instance Method Summary collapse
-
#initialize(name, context) ⇒ DeclarationReferenceProxy
constructor
A new instance of DeclarationReferenceProxy.
-
#to_ast_node ⇒ Object
Convert to DeclarationReference AST node.
Methods included from Sugar::ProxyRefinement
Constructor Details
#initialize(name, context) ⇒ DeclarationReferenceProxy
14 15 16 17 |
# File 'lib/kumi/core/ruby_parser/declaration_reference_proxy.rb', line 14 def initialize(name, context) @name = name @context = context end |
Instance Method Details
#to_ast_node ⇒ Object
Convert to DeclarationReference AST node
20 21 22 |
# File 'lib/kumi/core/ruby_parser/declaration_reference_proxy.rb', line 20 def to_ast_node Kumi::Syntax::DeclarationReference.new(@name, loc: @context.current_location) end |