MCPcopy Create free account
hub / github.com/ControlCplusControlV/Scribe / parse_identifier

Function parse_identifier

crates/papyrus/src/parser.rs:319–324  ·  view source on GitHub ↗

Parses an identifier into an Expr, which gets transpiled into a variable reference. These variables need to be kept track of during transpilation in case their value changes during runtime, which needs to be accounted for during transpilation.

(identifier: Pair<Rule>)

Source from the content-addressed store, hash-verified

317//These variables need to be kept track of during transpilation in case their value changes during runtime,
318// which needs to be accounted for during transpilation.
319fn parse_identifier(identifier: Pair<Rule>) -> Expr {
320 return Expr::Variable(ExprVariableReference {
321 identifier: identifier.as_str().to_string(),
322 inferred_type: None,
323 });
324}
325
326//Parses a block into an Expr
327fn parse_block(expression: Pair<Rule>) -> ExprBlock {

Callers 1

parse_expressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected