001 /* Copyright 2000, 2001, Compaq Computer Corporation */ 002 003 /* IF THIS IS A JAVA FILE, DO NOT EDIT IT! 004 005 Most Java files in this directory which are part of the Javafe AST 006 are automatically generated using the astgen comment (see 007 ESCTools/Javafe/astgen) from the input file 'hierarchy.h'. If you 008 wish to modify AST classes or introduce new ones, modify 009 'hierarchy.j.' 010 */ 011 012 package javafe.ast; 013 014 import javafe.util.Assert; 015 import javafe.util.Location; 016 import javafe.util.ErrorSet; 017 018 // Convention: unless otherwise noted, integer fields named "loc" refer 019 // to the location of the first character of the syntactic unit 020 021 022 // Abstract class containing common parts of Block and SwitchBlock 023 // syntactic units. 024 025 public abstract class GenericBlockStmt extends Stmt 026 { 027 public /*@ non_null @*/ StmtVec stmts; 028 029 //@ invariant locOpenBrace != javafe.util.Location.NULL; 030 public int locOpenBrace; 031 032 //@ invariant locCloseBrace != javafe.util.Location.NULL; 033 public int locCloseBrace; 034 035 036 public int getEndLoc() { return locCloseBrace; } 037 038 039 // Generated boilerplate constructors: 040 041 /** 042 * Construct a raw GenericBlockStmt whose class invariant(s) have not 043 * yet been established. It is the caller's job to 044 * initialize the returned node's fields so that any 045 * class invariants hold. 046 */ 047 //@ requires I_will_establish_invariants_afterwards; 048 protected GenericBlockStmt() {} //@ nowarn Invariant,NonNullInit; 049 050 public void check() { 051 super.check(); 052 for(int i = 0; i < this.stmts.size(); i++) 053 this.stmts.elementAt(i).check(); 054 } 055 056 }