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

Function ParseJavaFile

backend/engine/java_parser.go:47–53  ·  view source on GitHub ↗

ParseJavaFile parses a Java file into a structured representation This is a hand-written recursive descent parser simplified for structure extraction

(path string)

Source from the content-addressed store, hash-verified

45// ParseJavaFile parses a Java file into a structured representation
46// This is a hand-written recursive descent parser simplified for structure extraction
47func ParseJavaFile(path string) (*JavaFile, error) {
48 contentBytes, err := ioutil.ReadFile(path)
49 if err != nil {
50 return nil, err
51 }
52 return ParseJavaSource(string(contentBytes), path)
53}
54
55// ParseJavaSource parses Java source code string
56func ParseJavaSource(content string, path string) (*JavaFile, error) {

Callers 1

indexFileMethod · 0.85

Calls 1

ParseJavaSourceFunction · 0.85

Tested by

no test coverage detected