Class: Y2R::AST::YCP::Entry
- Inherits:
-
Node
- Object
- OpenStruct
- Node
- Y2R::AST::YCP::Entry
show all
- Defined in:
- lib/y2r/ast/ycp.rb
Instance Method Summary
collapse
Methods inherited from Node
#always_returns?, #compile_as_copy_if_needed, #compile_statements, #compile_statements_inside_block, #compile_statements_with_whitespace, #creates_local_scope?, #needs_copy?, #never_nil?, #optimize_last_statement, #optimize_next, #optimize_return, #remove_duplicate_imports, transfers_comments
Instance Method Details
#compile(context) ⇒ Object
1203
1204
1205
|
# File 'lib/y2r/ast/ycp.rb', line 1203
def compile(context)
RubyVar.for(ns, name, context, :in_code)
end
|
#compile_as_ref(context) ⇒ Object
1207
1208
1209
|
# File 'lib/y2r/ast/ycp.rb', line 1207
def compile_as_ref(context)
Ruby::Variable.new(:name => "#{name}_ref")
end
|