class Emfrp::CodegenContext::Block
Constants
- T
Public Class Methods
new(head_str, elements, foot_str)
click to toggle source
# File lib/emfrp/compile/c/codegen_context.rb, line 197 def initialize(head_str, elements, foot_str) @head_str = head_str @elements = elements @foot_str = foot_str end
Public Instance Methods
to_s(t=0)
click to toggle source
# File lib/emfrp/compile/c/codegen_context.rb, line 203 def to_s(t=0) res = "" res << T[t] + @head_str + "\n" @elements.each do |e| case e when Block res << e.to_s(t+1) + "\n" when String res << T[t+1] + e + "\n" end end res << T[t] + @foot_str end