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

Method match

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

If current token matches any of the types, consume and return True.

(self, *types: TokenType)

Source from the content-addressed store, hash-verified

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."""
179 for token_type in types:
180 if self.check(token_type):
181 self.advance()
182 return True
183 return False
184
185 def advance(self) -> Token:
186 """Consume and return the current token."""

Callers 15

parse_fieldMethod · 0.95
parse_list_typeMethod · 0.95
parse_map_typeMethod · 0.95
_sanitize_function_nameFunction · 0.45
_java_propsFunction · 0.45
_update_rust_versionFunction · 0.45
_update_pubspec_versionFunction · 0.45
_update_dart_changelogFunction · 0.45
_is_release_versionFunction · 0.45
parse_sync_mappingsFunction · 0.45
load_serialized_sizesFunction · 0.45

Calls 2

checkMethod · 0.95
advanceMethod · 0.95

Tested by

no test coverage detected