MCPcopy Create free account
hub / github.com/Glyphack/enderpy / parse_identifier

Method parse_identifier

parser/src/parser/parser.rs:2802–2811  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2800 }
2801
2802 fn parse_identifier(&mut self) -> Result<Expression, ParsingError> {
2803 let node = self.start_node();
2804 let value = self.cur_token().to_string(self.source);
2805 self.expect(Kind::Identifier)?;
2806 Ok(Expression::Name(Box::new(Name {
2807 node: self.finish_node_chomped(node),
2808 id: value,
2809 parenthesized: false,
2810 })))
2811 }
2812
2813 // https://docs.python.org/3/reference/expressions.html#yield-expressions
2814 fn parse_yield_expression(&mut self) -> Result<Expression, ParsingError> {

Callers 1

parse_atomMethod · 0.80

Calls 6

NameClass · 0.85
start_nodeMethod · 0.80
to_stringMethod · 0.80
cur_tokenMethod · 0.80
expectMethod · 0.80
finish_node_chompedMethod · 0.80

Tested by

no test coverage detected