app/mutations/sequences/legacy_renderer.rb
# Top level function call for converting a single EdgeNode into a JSON
# document. Returns Ruby hash that conforms to CeleryScript semantics.
Top level function call for converting a single EdgeNode into a JSON
document. Returns Ruby hash that conforms to CeleryScript semantics.
Top level function call for converting a single EdgeNode into a JSON document . Returns Ruby hash that conforms to CeleryScript semantics .
def recurse_into_node(node)
      out = { kind: node.kind, args: recurse_into_args(node) }
      body = get_body_elements(node)
      if body.empty?
        out[:body] = [] if node.kind == "sequence"
      else
        out[:body] = body.map { |x| recurse_into_node(x) }
      end
      out[:comment] = node.comment if node.comment
      return out
    end
def recurse_into_node ( node ) out = { kind : node . kind , args : recurse_into_args ( node ) } body = get_body_elements ( node ) if body . empty? out [ :body ] = [ ] if node . kind == "sequence" else out [ :body ] = body . map { | x | recurse_into_node ( x ) } end out [ :comment ] = node . comment if node . comment return out end
Top level function call for converting a single EdgeNode into a JSON
document.
Top level function call for converting a single EdgeNode into a JSON document .
# Legacy sequences *must* have body on sequence. Others are fine.
node