Beispiel #1
0
  /**
   * Convert the specified node to a lisp-like syntax to expose the tree structure of the node and
   * its descendants in a form that is easy test during unit testing
   *
   * @param node
   * @return
   */
  public static String toTreeString(IParseNode node) {
    List<String> parts = new ArrayList<String>();

    toTreeString(parts, node);

    return StringUtil.concat(parts);
  }
Beispiel #2
0
  protected void assertListCrossProducts(List<List<String>> lists, JSTokenType tokenType) {
    ListCrossProduct<String> crossProduct = new ListCrossProduct<String>();

    for (List<String> list : lists) {
      crossProduct.addList(list);
    }

    for (List<String> list : crossProduct) {
      String text = StringUtil.concat(list);

      assertTokenType(text, tokenType);
    }
  }