001    // -*- mode: java -*-
002    /* Copyright 2000, 2001, Compaq Computer Corporation */
003    
004    /* IF THIS IS A JAVA FILE, DO NOT EDIT IT!  
005    
006       Most Java files in this directory which are part of the Javafe AST
007       are automatically generated using the astgen comment (see
008       ESCTools/Javafe/astgen) from the input file 'hierarchy.h'.  If you
009       wish to modify AST classes or introduce new ones, modify
010       'hierarchy.j.'
011     */
012    
013    package javafe.ast;
014    
015    import javafe.util.Assert;
016    import javafe.util.Location;
017    import javafe.util.ErrorSet;
018    
019    // Convention: unless otherwise noted, integer fields named "loc" refer
020    // to the location of the first character of the syntactic unit
021    
022    
023    public class SkipStmt extends Stmt
024    {
025      //@ invariant loc != javafe.util.Location.NULL;
026      public int loc;
027    
028      
029      //@ public represents startLoc <- loc;
030      public /*@ pure @*/ int getStartLoc() { return loc; }
031    
032    
033    // Generated boilerplate constructors:
034    
035      //@ ensures this.loc == loc;
036      protected SkipStmt(int loc) {
037         super();
038         this.loc = loc;
039      }
040    
041    // Generated boilerplate methods:
042    
043      public final int childCount() {
044         return 0;
045      }
046    
047      public final Object childAt(int index) {
048              /*throws IndexOutOfBoundsException*/
049         if (index < 0)
050            throw new IndexOutOfBoundsException("AST child index " + index);
051         int indexPre = index;
052    
053         int sz;
054    
055         throw new IndexOutOfBoundsException("AST child index " + indexPre);
056      }   //@ nowarn Exception;
057    
058      public final /*@non_null*/String toString() {
059         return "[SkipStmt"
060            + " loc = " + this.loc
061            + "]";
062      }
063    
064      public final int getTag() {
065         return TagConstants.SKIPSTMT;
066      }
067    
068      public final void accept(Visitor v) { v.visitSkipStmt(this); }
069    
070      public final Object accept(VisitorArgResult v, Object o) {return v.visitSkipStmt(this, o); }
071    
072      public void check() {
073         super.check();
074      }
075    
076      //@ requires loc != javafe.util.Location.NULL;
077      //@ ensures \result != null;
078      public static SkipStmt make(int loc) {
079         SkipStmt result = new SkipStmt(loc);
080         return result;
081      }
082    }