MCPcopy Create free account
hub / github.com/apache/fory / check

Method check

compiler/fory_compiler/frontend/fdl/parser.py:173–175  ·  view source on GitHub ↗

Check if the current token has the given type.

(self, token_type: TokenType)

Source from the content-addressed store, hash-verified

171 return self.tokens[pos]
172
173 def check(self, token_type: TokenType) -> bool:
174 """Check if the current token has the given type."""
175 return self.current().type == token_type
176
177 def match(self, *types: TokenType) -> bool:
178 """If current token matches any of the types, consume and return True."""

Callers 15

matchMethod · 0.95
consumeMethod · 0.95
parseMethod · 0.95
parse_packageMethod · 0.95
parse_option_valueMethod · 0.95
parse_importMethod · 0.95
parse_enumMethod · 0.95
parse_reservedMethod · 0.95
parse_messageMethod · 0.95
parse_unionMethod · 0.95
parse_union_fieldMethod · 0.95
parse_fieldMethod · 0.95

Calls 1

currentMethod · 0.95