Prohibit multiple load() statements from appearing on the same line
This is an incompatible change, but it's an obvious bug.
RELNOTES[INC]: Fixed a bug whereby multiple load() statements could appear on the same line
PiperOrigin-RevId: 161070399
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 06f0ac9..7bc94c1 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
@@ -1116,6 +1116,7 @@
LoadStatement stmt = new LoadStatement(importString, symbols);
list.add(setLocation(stmt, start, token.left));
+ expectAndRecover(TokenKind.NEWLINE);
}
/**