summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/ast.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-07-29 23:33:56 -0500
committerkpdecker <kpdecker@gmail.com>2013-10-14 22:50:12 -0500
commit0cc6e270f971f6ad7e916bfab82e889419affa27 (patch)
tree0a36e09509741436e4ba3306e398dc27b7deb95b /lib/handlebars/compiler/ast.js
parent06d94fed56b43bdf0c824bdce966596e551d3324 (diff)
downloadhandlebars.js-0cc6e270f971f6ad7e916bfab82e889419affa27.zip
handlebars.js-0cc6e270f971f6ad7e916bfab82e889419affa27.tar.gz
handlebars.js-0cc6e270f971f6ad7e916bfab82e889419affa27.tar.bz2
Pass open token to MustacheNode for flag parsing
Diffstat (limited to 'lib/handlebars/compiler/ast.js')
-rw-r--r--lib/handlebars/compiler/ast.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 336492d..db7063c 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -6,11 +6,12 @@ export function ProgramNode(statements, inverse) {
if(inverse) { this.inverse = new ProgramNode(inverse); }
}
-export function MustacheNode(rawParams, hash, unescaped) {
+export function MustacheNode(rawParams, hash, open) {
this.type = "mustache";
- this.escaped = !unescaped;
this.hash = hash;
+ this.escaped = open[2] !== '{' && open[2] !== '&';
+
var id = this.id = rawParams[0];
var params = this.params = rawParams.slice(1);