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 escjava.ast; 013 014 import java.util.Hashtable; 015 import java.util.Set; 016 import java.util.ArrayList; 017 018 import javafe.ast.*; 019 import javafe.util.Assert; 020 import javafe.util.Location; 021 import escjava.ParsedRoutineSpecs; 022 023 // Convention: unless otherwise noted, integer fields named "loc" refer 024 // to the location of the first character of the syntactic unit 025 026 //# TagBase javafe.tc.TagConstants.LAST_TAG + 1 027 //# VisitorRoot javafe.ast.Visitor 028 029 030 public abstract class AssignCmd extends GuardedCmd 031 { 032 // denotes a subtype-dependent assignment to v 033 // rhs must be pure 034 public /*@ non_null @*/ VariableAccess v; 035 036 public /*@ non_null @*/ Expr rhs; 037 038 039 public int getStartLoc() { return v.getStartLoc(); } 040 public int getEndLoc() { return rhs.getEndLoc(); } 041 042 043 // Generated boilerplate constructors: 044 045 /** 046 * Construct a raw AssignCmd whose class invariant(s) have not 047 * yet been established. It is the caller's job to 048 * initialize the returned node's fields so that any 049 * class invariants hold. 050 */ 051 //@ requires I_will_establish_invariants_afterwards; 052 protected AssignCmd() {} //@ nowarn Invariant,NonNullInit; 053 054 public void check() { 055 super.check(); 056 this.v.check(); 057 this.rhs.check(); 058 } 059 060 }