MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / process_string_escapes

Method process_string_escapes

crates/hll-to-ir/src/parser.rs:1509–1533  ·  view source on GitHub ↗
(&self, input: &str)

Source from the content-addressed store, hash-verified

1507 self.advance();
1508 let parsed = (|| -> Result<Vec<Type>, ParserError> {
1509 let mut args = Vec::new();
1510 loop {
1511 args.push(self.parse_type()?);
1512 if self.match_comma() {
1513 continue;
1514 }
1515 break;
1516 }
1517 self.expect_generic_close()?;
1518 if !self.check_lbrace() {
1519 return Err(self.error("expected `{` after struct type arguments"));
1520 }
1521 Ok(args)
1522 })();
1523
1524 if let Ok(args) = parsed {
1525 Some(args)
1526 } else {
1527 self.pos = saved_pos;
1528 self.pending_gt_from_shr = saved_pending_gt;
1529 None
1530 }
1531 }
1532
1533 // `Owner<args>.MEMBER`: an associated-constant projection in expression
1534 // position. Backtracks (like call type arguments) when the shape mismatches.
1535 fn try_parse_associated_member(&mut self) -> Option<(Vec<Type>, String)> {
1536 if self.peek() != Some(&Token::Lt) {

Callers 1

parse_primaryMethod · 0.80

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected