public LHSListNode addLHS(String id, Type t, Position position, Position position2) {
   addChild(new LHSNode(id, t, position, position2));
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   return this;
 }
 public LHSListNode addLHS(ArrayLookUpNode b, Position position, Position position2) {
   addChild(new LHSNode(b, position, position2));
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   return this;
 }
示例#3
0
 public BreakNode(Position position, Position position2, boolean b) {
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   setLabel("CONTINUE");
   isContinue = b;
 }
示例#4
0
 public BreakNode(Position position, Position position2) {
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   isContinue = false;
   setLabel("BREAK");
 }
 public LHSListNode(ArrayLookUpNode a, Position aleft, Position aright) {
   addLHS(a, aleft, aright);
   Position newPos =
       new Location(
           aleft.unit(),
           aleft.lineStart(),
           aright.lineEnd(),
           aleft.columnStart(),
           aright.columnEnd());
   setPosition(newPos);
   // setLabel("LHS: array assignment");
   setLabel("LHS List");
 }
 public LHSListNode(String id, Position idleft, Position idright) {
   addLHS(id, idleft, idright);
   Position newPos =
       new Location(
           idleft.unit(),
           idleft.lineStart(),
           idright.lineEnd(),
           idleft.columnStart(),
           idright.columnEnd());
   setPosition(newPos);
   // setLabel("LHS:"+id);
   setLabel("LHS List");
 }
 public LHSListNode(String id, Type t, Position position, Position position2) {
   addLHS(id, t, position, position2);
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   // setLabel("LHS:"+id);
   setLabel("LHS List");
 }
 public LHSListNode(Position position, Position position2, boolean addUnderscore) {
   if (addUnderscore) {
     addLHS(position, position2);
   }
   Position newPos =
       new Location(
           position.unit(),
           position.lineStart(),
           position2.lineEnd(),
           position.columnStart(),
           position2.columnEnd());
   setPosition(newPos);
   // setLabel("LHS:Underscore");
   setLabel("LHS List");
 }