code comments and minor improvements

This commit is contained in:
Dave Holoway
2020-06-30 12:07:01 +01:00
parent 3e1bd63330
commit 9fde7bcd9d
6 changed files with 256 additions and 117 deletions

View File

@@ -653,7 +653,7 @@ class SourceUnit {
return null;
}
for (let type of this.types) {
for (let method of type.sourceMethods) {
for (let method of [...type.sourceMethods, ...type.constructors, ...type.initers]) {
if (method.body && method.body.tokens && method.body.tokens.includes(token)) {
return method;
}