traverseItem method

void traverseItem(
  1. NodeOutput item,
  2. State state,
  3. TraverseQueue levelQueue
)

Implementation

void traverseItem(NodeOutput item, State state, TraverseQueue levelQueue) {
  var mtx = state.mtx;
  switch (nodeType(item.id)) {
    case NodeType.rootSimple:
      state.y = mtx.getFreeRowForColumn(0);
      continue simple;
    simple:
    case NodeType.simple:
      handleSimpleNode(item, state, levelQueue);
      break;
    case NodeType.rootSplit:
      state.y = mtx.getFreeRowForColumn(0);
      continue split;
    split:
    case NodeType.split:
      handleSplitNode(item, state, levelQueue);
      break;
    case NodeType.join:
      handleJoinNode(item, state, levelQueue);
      break;
    case NodeType.splitJoin:
      handleSplitJoinNode(item, state, levelQueue);
      break;
    default:
      throw "Unknown node type ${nodeType(item.id)}";
  }
}