Use SkylarkSemantics in place of options class in the interpreter
Mainly this just means using getters instead of fields to access option values.
RELNOTES: None
PiperOrigin-RevId: 171101597
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Eval.java b/src/main/java/com/google/devtools/build/lib/syntax/Eval.java
index 6fd1f28..e0fdbff 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Eval.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Eval.java
@@ -98,7 +98,7 @@
}
FunctionSignature sig = node.getSignature().getSignature();
- if (env.getSemantics().incompatibleDisallowKeywordOnlyArgs
+ if (env.getSemantics().incompatibleDisallowKeywordOnlyArgs()
&& sig.getShape().getMandatoryNamedOnly() > 0) {
throw new EvalException(
node.getLocation(),
@@ -129,7 +129,7 @@
}
void execLoad(LoadStatement node) throws EvalException, InterruptedException {
- if (env.getSemantics().incompatibleLoadArgumentIsLabel) {
+ if (env.getSemantics().incompatibleLoadArgumentIsLabel()) {
String s = node.getImport().getValue();
if (!s.startsWith("//") && !s.startsWith(":") && !s.startsWith("@")) {
throw new EvalException(