Refactoring for LoadStatement
Use StringLiteral instead of String+Location. This improves consistency.
getRawImports() now returns StringLiterals, which makes possible to show
location in error messages.
--
MOS_MIGRATED_REVID=136019586
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 4d285a3..4101062 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
@@ -1055,8 +1055,7 @@
}
expect(TokenKind.RPAREN);
- LoadStatement stmt = new LoadStatement(
- importString.getValue(), importString.getLocation(), symbols);
+ LoadStatement stmt = new LoadStatement(importString, symbols);
list.add(setLocation(stmt, start, token.left));
}