Analyzer now no longer attempts to analyze an invalid tree
This commit is contained in:
parent
5d27befb6f
commit
b2fadd2fd3
@ -49,7 +49,9 @@ func Analyze (modulePath string, skim bool) (table SectionTable, err error) {
|
|||||||
// analyze performs an analysis operation given the state of the operation
|
// analyze performs an analysis operation given the state of the operation
|
||||||
// struct.
|
// struct.
|
||||||
func (analyzer *analysisOperation) analyze () (err error) {
|
func (analyzer *analysisOperation) analyze () (err error) {
|
||||||
tree, err := parser.Fetch(analyzer.modulePath, false)
|
var tree parser.SyntaxTree
|
||||||
|
tree, err = parser.Fetch(analyzer.modulePath, false)
|
||||||
|
if err != nil { return }
|
||||||
sections := tree.Sections()
|
sections := tree.Sections()
|
||||||
|
|
||||||
for !sections.End() {
|
for !sections.End() {
|
||||||
|
Reference in New Issue
Block a user