MCPcopy Create free account
hub / github.com/Yuy0ung/YuC0de / parse

Method parse

backend/engine/java_parser.go:197–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195}
196
197func (p *Parser) parse() {
198 for p.pos < len(p.tokens) {
199 token := p.peek()
200
201 if token.Value == "package" {
202 p.parsePackage()
203 } else if token.Value == "import" {
204 p.parseImport()
205 } else if token.Value == "public" || token.Value == "class" || token.Value == "interface" || token.Value == "@" {
206 // Start of class definition (potentially with annotations)
207 p.parseClass()
208 } else {
209 p.next()
210 }
211 }
212}
213
214func (p *Parser) parsePackage() {
215 p.consume("package")

Callers 1

ParseJavaSourceFunction · 0.95

Calls 5

peekMethod · 0.95
parsePackageMethod · 0.95
parseImportMethod · 0.95
parseClassMethod · 0.95
nextMethod · 0.95

Tested by

no test coverage detected