pub fn error(&mut self, msg: Located<String>) {
        match self.current_bundle {
            Some(BundleIndex(index)) => {
                if index < self.errors.len() {
                    self.errors[index].push(msg.clone());
                }
                else {
                    self.errors.resize(index+1, vec![]);
                    self.errors[index].push(msg.clone());
                }
            }
            None => {
                unreachable!();
            },
        }
    }
// Report an error. It is required that there be a current bundle with which to associate the errors.
Report an error. It is required that there be a current bundle with which to associate the errors.
Report an error . It is required that there be a current bundle with which to associate the errors .
pub fn error(&mut self, msg: Located<String>) {
        match self.current_bundle {
            Some(BundleIndex(index)) => {
                if index < self.errors.len() {
                    self.errors[index].push(msg.clone());
                }
                else {
                    self.errors.resize(index+1, vec![]);
                    self.errors[index].push(msg.clone());
                }
            }
            None => {
                unreachable!();
            },
        }
    }
pub fn error ( & mut self , msg : Located < String > ) { match self . current_bundle { Some ( BundleIndex ( index ) ) => { if index < self . errors . len ( ) { self . errors [ index ] . push ( msg . clone ( ) ) ; } else { self . errors . resize ( index + 1 , vec ! [ ] ) ; self . errors [ index ] . push ( msg . clone ( ) ) ; } } None => { unreachable ! ( ) ; } , } }
Report an error.
Report an error .
&mut self
msg
Located<String>
&mut self
msg
Located<String>