aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2017-10-26 10:27:00 +0200
committerGravatar Dmitry Lomov <dslomov@google.com>2017-10-26 10:59:41 +0200
commit8cb1d2fb460a9caf47df58d7ff051d31080a77cb (patch)
treedcca2e1b72d55de0f990c289176765af8b88192a /src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java
parente012dcff33c26f5054066d5b8d9c26d356d5a30b (diff)
Automated rollback of commit ca77f608e486bf7aa762565d25bf7b9e30f2268c.
This also rolls back unknown commit. *** Reason for rollback *** Affected expand_location Skylark API semantics - it no longer accepts ${abc} or plain dollar signs, but complains. *** Original change description *** Extend TemplateExpander to handle $(func param) expansion Rewrite the Expander to use the new functionality; also rewrite the Skylark expand_location function to use it. PiperOrigin-RevId: 173508888
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java b/src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java
index dc6d27598d..d4aa40dcf0 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/stringtemplate/TemplateContext.java
@@ -14,29 +14,18 @@
package com.google.devtools.build.lib.analysis.stringtemplate;
/**
- * Interface to be implemented by callers of {@link TemplateExpander} which defines the expansion of
- * each template variable and function.
+ * Interface to be implemented by callers of MakeVariableExpander which defines the expansion of
+ * each "Make" variable.
*/
public interface TemplateContext {
/**
- * Returns the expansion of the specified template variable.
+ * Returns the expansion of the specified "Make" variable.
*
- * @param name the variable to expand
- * @return the expansion of the variable
- * @throws ExpansionException if the given variable was not defined or there was any other error
- * during expansion
+ * @param name the variable to expand.
+ * @return the expansion of the variable.
+ * @throws ExpansionException if the variable "var" was not defined or
+ * there was any other error while expanding "var".
*/
String lookupVariable(String name) throws ExpansionException;
-
- /**
- * Returns the expansion of the specified template function with the given parameter.
- *
- * @param name the function name
- * @param param the function parameter
- * @return the expansion of the function applied to the parameter
- * @throws ExpansionException if the function was not defined, or if the function application
- * failed for some reason
- */
- String lookupFunction(String name, String param) throws ExpansionException;
} \ No newline at end of file