Publish a static ASTNode setLocation

--
MOS_MIGRATED_REVID=87519507
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Parser.java b/src/main/java/com/google/devtools/build/lib/syntax/Parser.java
index 93d6a06..b8fb203 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Parser.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Parser.java
@@ -330,16 +330,13 @@
   }
 
   // Convenience wrapper around ASTNode.setLocation that returns the node.
-  private <NODE extends ASTNode> NODE
-      setLocation(NODE node, int startOffset, int endOffset) {
-    node.setLocation(lexer.createLocation(startOffset, endOffset));
-    return node;
+  private <NODE extends ASTNode> NODE setLocation(NODE node, Location location) {
+    return ASTNode.<NODE>setLocation(location, node);
   }
 
   // Another convenience wrapper method around ASTNode.setLocation
-  private <NODE extends ASTNode> NODE setLocation(NODE node, Location location) {
-    node.setLocation(location);
-    return node;
+  private <NODE extends ASTNode> NODE setLocation(NODE node, int startOffset, int endOffset) {
+    return setLocation(node, lexer.createLocation(startOffset, endOffset));
   }
 
   // Convenience method that uses end offset from the last node.