Package loop.ast

Examples of loop.ast.InlineListDef


  }

  private Node reduceNode(Node child) {
    // Not all parts of the sexpr are lists.
    if (child instanceof InlineListDef) {
      InlineListDef list = (InlineListDef) child;

      if (!list.children().isEmpty()) {
        Node first = list.children().get(0);
        if (first instanceof Variable) {
          Variable var = (Variable) first;

          if ("define".equals(var.name)) {
            return transformToFunctionDecl(list);
View Full Code Here


   * <p/>
   * sexpr := atom | (LPAREN sexpr* RPAREN)
   */
  @Override
  public Node parse() {
    InlineListDef list = new InlineListDef(false);
    while (!endOfInput()) {
      Node sexpr = sexpr();
      if (sexpr != null)
        list.add(new SexprAstTransformer(sexpr).transform());
    }
    return list;
  }
View Full Code Here

    List<Token> startParen = match(Token.Kind.LPAREN);
    if (startParen == null)
      return null;

    InlineListDef listDef = new InlineListDef(false).sourceLocation(startParen);
    Node inner;
    while ((inner = sexpr()) != null) {
      listDef.add(inner);
    }

    if (match(Token.Kind.RPAREN) == null)
      throw new RuntimeException("Expected ')'");
View Full Code Here

TOP

Related Classes of loop.ast.InlineListDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.