ParseJavaFile parses a Java file into a structured representation This is a hand-written recursive descent parser simplified for structure extraction
(path string)
| 45 | // ParseJavaFile parses a Java file into a structured representation |
| 46 | // This is a hand-written recursive descent parser simplified for structure extraction |
| 47 | func 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 |
| 56 | func ParseJavaSource(content string, path string) (*JavaFile, error) { |
no test coverage detected