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

Method parse_keyword_item

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

Source from the content-addressed store, hash-verified

3139 }
3140
3141 fn parse_keyword_item(&mut self) -> Result<Keyword, ParsingError> {
3142 let node = self.start_node();
3143 let arg = self.cur_token().to_string(self.source);
3144 self.expect(Kind::Identifier);
3145 self.expect(Kind::Assign);
3146 let value = self.parse_expression()?;
3147 Ok(Keyword {
3148 node: self.finish_node(node),
3149 arg: Some(arg),
3150 value,
3151 })
3152 }
3153
3154 fn parse_parameters(&mut self, is_lambda: bool) -> Result<Arguments, ParsingError> {
3155 let node = self.start_node();

Callers 2

parse_primaryMethod · 0.80
parse_argument_listMethod · 0.80

Calls 6

start_nodeMethod · 0.80
to_stringMethod · 0.80
cur_tokenMethod · 0.80
expectMethod · 0.80
parse_expressionMethod · 0.80
finish_nodeMethod · 0.80

Tested by

no test coverage detected