parser: `Visitor::visit` does not accepts `null`
[nit.git] / src / parser / xss / parser.xss
index a461563..e2fabc5 100644 (file)
@@ -197,11 +197,9 @@ private class ComputeProdLocationVisitor
        # Location of the last visited token in the current production
        var _last_location: nullable Location = null
 
-       redef fun visit(n: nullable PNode)
+       redef fun visit(n: PNode)
        do
-               if n == null then
-                       return
-               else if n isa Token then
+               if n isa Token then
                        var loc = n.location
                        _last_location = loc