Index: pkg/dartino_compiler/lib/src/find_position_visitor.dart |
diff --git a/pkg/dartino_compiler/lib/src/find_position_visitor.dart b/pkg/dartino_compiler/lib/src/find_position_visitor.dart |
index 72e62ca43cd7496f4a09842ac40bcb0cd7590827..d1656a12b4267376ea432959d4a631bf1bb5975d 100644 |
--- a/pkg/dartino_compiler/lib/src/find_position_visitor.dart |
+++ b/pkg/dartino_compiler/lib/src/find_position_visitor.dart |
@@ -67,6 +67,8 @@ class FindFunctionAtPositionVisitor extends BaseElementVisitor { |
visitElement(Element element, _) {} |
bool containsPosition(Node node) { |
+ // TODO(sigurdm): Find out when [node] is null. |
+ if (node == null) return false; |
danrubel
2016/07/12 14:15:06
Should we log something here to obtain more inform
sigurdm
2016/08/10 09:05:11
I prefer that we replicate it locally and fix it.
|
return node.getBeginToken().charOffset <= position && |
position < node.getEndToken().charEnd; |
} |