Fix the location of load statements in Skylark.
Previously, the closing parenthesis was not included in the location.
RELNOTES: none
PiperOrigin-RevId: 171527078
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 6d45726..e59f329 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
@@ -1053,10 +1053,10 @@
parseLoadSymbol(symbols);
}
- expect(TokenKind.RPAREN);
LoadStatement stmt = new LoadStatement(importString, symbols);
- list.add(setLocation(stmt, start, token.left));
+ list.add(setLocation(stmt, start, token.right));
+ expect(TokenKind.RPAREN);
expectAndRecover(TokenKind.NEWLINE);
}