aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar fzaiser <fzaiser@google.com>2017-10-09 15:16:50 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-10-10 11:22:04 +0200
commitb5768af15f2949385b3d782199336d70e56e00e2 (patch)
treeac2eb5c63147cd8a27933f528f4475fcd771f94f /src/main
parent8880b7abceb78b22b56be53d02bf97d9e8cb74cb (diff)
Fix the location of load statements in Skylark.
Previously, the closing parenthesis was not included in the location. RELNOTES: none PiperOrigin-RevId: 171527078
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Parser.java4
1 files changed, 2 insertions, 2 deletions
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 6d457267ba..e59f3295af 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 @@ public class Parser {
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);
}