MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / check

Method check

leanr-syntax/src/parser.rs:667–672  ·  view source on GitHub ↗

Check if current token matches

(&self, kind: &TokenKind)

Source from the content-addressed store, hash-verified

665
666 /// Check if current token matches
667 fn check(&self, kind: &TokenKind) -> bool {
668 if self.is_eof() {
669 return false;
670 }
671 std::mem::discriminant(&self.current().kind) == std::mem::discriminant(kind)
672 }
673
674 /// Expect a specific token
675 fn expect(&mut self, kind: TokenKind) -> crate::Result<Token> {

Callers 14

parse_defMethod · 0.45
parse_inductiveMethod · 0.45
parse_constructorMethod · 0.45
parse_structureMethod · 0.45
parse_universe_paramsMethod · 0.45
parse_paramsMethod · 0.45
parse_arrow_exprMethod · 0.45
parse_forall_exprMethod · 0.45
parse_lambda_exprMethod · 0.45
parse_lambda_paramsMethod · 0.45
parse_let_exprMethod · 0.45
parse_match_exprMethod · 0.45

Calls 2

currentMethod · 0.80
is_eofMethod · 0.45

Tested by

no test coverage detected