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

Method parse_import_call

crates/hll-to-ir/src/parser.rs:357–363  ·  view source on GitHub ↗

Consume `import ( string )` and return the path literal, with `import` next. Used by the `alias := import(...)` and `const alias = import(...)` module forms.

(&mut self)

Source from the content-addressed store, hash-verified

355 let size = self.parse_array_length()?;
356 self.expect_rbracket()?;
357 let ty = self.parse_type()?;
358 return Ok(Type::Array(size, Box::new(ty)));
359 }
360
361 let mut ty = self.parse_type_atom()?;
362
363 loop {
364 // A virtual `>` still belongs to the enclosing generic type. Suffixes
365 // after `>>` therefore apply only after that outer close is consumed.
366 if self.pending_gt_from_shr {

Callers 1

parse_declarationMethod · 0.80

Calls 4

expect_lparenMethod · 0.80
expect_string_literalMethod · 0.80
expect_rparenMethod · 0.80
advanceMethod · 0.45

Tested by

no test coverage detected