srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
There are situations where
x.mt.t
is nil, so doingnode, i := x.mt.t.IndexedTraverse([]rune(q))
results in a nil pointer dereference panic.This is a quick fix to prevent a panic. A proper fix will be to avoid calling
getByQuery
when the mafsaTable is not built/read.