Module: Opal::Nodes::XStringLineSplitter
- Included in:
- DynamicXStringNode, XStringNode
- Defined in:
- opal/lib/opal/nodes/literal.rb
Instance Method Summary collapse
Instance Method Details
#compile_split_lines(value, sexp) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'opal/lib/opal/nodes/literal.rb', line 88 def compile_split_lines(value, sexp) idx = 0 value.each_line do |line| if idx == 0 push line else line_sexp = s() line_sexp.source = [sexp.line + idx, 0] frag = Fragment.new(line, line_sexp) push frag end idx += 1 end end |