00001: package clogs.ast; 00002: 00003: import clogs.util.List; 00004: 00005: 00006: public class StatGoto extends Stat 00007: { 00008: public final String target; 00009: 00010: 00011: public StatGoto (String target) 00012: { 00013: this (List.<String>nil (), target); 00014: } 00015: 00016: 00017: StatGoto (List<String> labels, String target) 00018: { 00019: super (labels); 00020: clogs.util.NonNull.check (target); 00021: this.target = target; 00022: } 00023: 00024: 00025: public Stat removeLabels () 00026: { 00027: return new StatGoto (List.<String> nil (), target); 00028: } 00029: 00030: 00031: public Stat addLabel (String label) 00032: { 00033: return new StatGoto (labels.cons (label), target); 00034: } 00035: } 00036: