summaryrefslogtreecommitdiffstats
path: root/docs/compiler-api.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/compiler-api.md')
-rw-r--r--docs/compiler-api.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/compiler-api.md b/docs/compiler-api.md
index 74af672..4a0ec01 100644
--- a/docs/compiler-api.md
+++ b/docs/compiler-api.md
@@ -115,6 +115,17 @@ interface SubExpression <: Expression {
`isHelper` is not required and is used to disambiguate between cases such as `{{foo}}` and `(foo)`, which have slightly different call behaviors.
+```java
+interface PartialExpression <: Expression {
+ type: "PartialExpression";
+ name: PathExpression | SubExpression;
+ params: [ Expression ];
+ hash: Hash;
+}
+```
+
+`path` may be a `SubExpression` when tied to a dynamic partial, i.e. `{{> (foo) }}`
+
##### Paths
```java
@@ -221,6 +232,8 @@ The `Handlebars.JavaScriptCompiler` object has a number of methods that may be c
- `name` is the current path component
- `type` is the type of name being evaluated. May be one of `context`, `data`, `helper`, or `partial`.
+ Note that this does not impact dynamic partials, which implementors need to be aware of. Overriding `VM.resolvePartial` may be required to support dynamic cases.
+
- `depthedLookup(name)`
Used to generate code that resolves parameters within any context in the stack. Is only used in `compat` mode.