(&mut self)
| 229 | } |
| 230 | |
| 231 | fn parse_const(&mut self) -> Result<Ident> { |
| 232 | let pos = self.pos(); |
| 233 | let ident = self.parse_ident()?; |
| 234 | if let Some(s) = ident.0.strip_prefix('$') { |
| 235 | Ok(Ident(s.to_string(), ident.1)) |
| 236 | } else { |
| 237 | Err(self.error( |
| 238 | pos, |
| 239 | "Not a constant identifier; must start with a '$'".to_string(), |
| 240 | )) |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | fn parse_pragma(&mut self) -> Result<Pragma> { |
| 245 | let ident = self.parse_ident()?; |