Package loop.ast

Examples of loop.ast.Assignment.lhs()


        // Strip the lhs of the assignment if this is a simple variable setter
        // as that will happen after the fact in a where-block.
        // However we still do have Assignment nodes that assign "in-place", i.e.
        // mutate the state of existing variables (example: a.b = c), and these need
        // to continue untouched.
        if (assignment.lhs() instanceof Variable)
          func.children().add(assignment.rhs());
        else
          func.children().add(parsedLine);
      } else
        func.children().add(parsedLine);
View Full Code Here


      if (addToWhereBlock && parsedLine instanceof Assignment) {
        Assignment assignment = (Assignment) parsedLine;

        boolean shouldReplace = false, shouldAddToWhere = true;
        if (assignment.lhs() instanceof Variable) {
          String name = ((Variable) assignment.lhs()).name;
          shellContext.put(name, result);

          // Look up the value of the RHS of the variable from the shell context,
          // if this is the second reference to the same variable.
View Full Code Here

      if (addToWhereBlock && parsedLine instanceof Assignment) {
        Assignment assignment = (Assignment) parsedLine;

        boolean shouldReplace = false, shouldAddToWhere = true;
        if (assignment.lhs() instanceof Variable) {
          String name = ((Variable) assignment.lhs()).name;
          shellContext.put(name, result);

          // Look up the value of the RHS of the variable from the shell context,
          // if this is the second reference to the same variable.
          assignment.setRhs(new LexprParser(new Tokenizer(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.