Browse Source

Return node itself from default node visit.

Herbert Vojčík 7 years ago
parent
commit
be2e625fef
2 changed files with 5 additions and 3 deletions
  1. 3 2
      src/Compiler-AST.js
  2. 2 1
      src/Compiler-AST.st

+ 3 - 2
src/Compiler-AST.js

@@ -3525,14 +3525,15 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._visitAll_($recv(aNode)._nodes());
+self._visitAll_($recv(aNode)._nodes());
+return aNode;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},$globals.NodeVisitor)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitNode: aNode\x0a\x09^ self visitAll: aNode nodes",
+source: "visitNode: aNode\x0a\x09self visitAll: aNode nodes.\x0a\x09^ aNode",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["visitAll:", "nodes"]

+ 2 - 1
src/Compiler-AST.st

@@ -834,7 +834,8 @@ visitMethodNode: aNode
 !
 
 visitNode: aNode
-	^ self visitAll: aNode nodes
+	self visitAll: aNode nodes.
+	^ aNode
 !
 
 visitReturnNode: aNode