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

Method parse_syntax

compiler/fory_compiler/frontend/proto/parser.py:144–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 )
143
144 def parse_syntax(self) -> str:
145 self.consume(TokenType.SYNTAX, "Expected 'syntax'")
146 self.consume(TokenType.EQUALS, "Expected '=' after syntax")
147 value = self.consume(TokenType.STRING, "Expected syntax string").value
148 self.consume(TokenType.SEMI, "Expected ';' after syntax declaration")
149 return value
150
151 def parse_package(self) -> str:
152 self.consume(TokenType.PACKAGE, "Expected 'package'")

Callers 1

parseMethod · 0.95

Calls 1

consumeMethod · 0.95

Tested by

no test coverage detected