Socket
Socket
Sign inDemoInstall

htmlbars

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmlbars - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

dist/cjs/htmlbars-compiler-tests/htmlbars-compiler.jshint.js

30

dist/amd/htmlbars-runtime.amd.js

@@ -10,7 +10,6 @@ define("htmlbars-runtime",

define("htmlbars-runtime/hooks",
["./utils","../htmlbars-util/safe-string","exports"],
function(__dependency1__, __dependency2__, __exports__) {
["./utils","exports"],
function(__dependency1__, __exports__) {
"use strict";
var merge = __dependency1__.merge;
var SafeString = __dependency2__["default"];

@@ -22,7 +21,8 @@ function content(morph, helperName, context, params, hash, options, env) {

} else {
value = this.simple(context, helperName, options);
if (options.type === 'value') {
value = helperName;
} else {
value = this.simple(context, helperName, options);
}
}
if (!options.escaped) {
value = new SafeString(value);
}
morph.update(value);

@@ -77,3 +77,3 @@ }

for (var i = 0, l = params.length; i < l; i++) {
if (options.types[i] === 'id') {
if (options.paramTypes[i] === 'id') {
value += this.simple(this, params[i], options);

@@ -382,2 +382,8 @@ } else {

prototype.createUnsafeMorph = function(parent, start, end, contextualElement){
var morph = this.createMorph(parent, start, end, contextualElement);
morph.escaped = false;
return morph;
};
// This helper is just to keep the templates good looking,

@@ -392,2 +398,8 @@ // passing integers instead of element references.

prototype.createUnsafeMorphAt = function(parent, startIndex, endIndex, contextualElement) {
var morph = this.createMorphAt(parent, startIndex, endIndex, contextualElement);
morph.escaped = false;
return morph;
};
prototype.insertMorphBefore = function(element, referenceChild, contextualElement) {

@@ -763,2 +775,3 @@ var start = this.document.createTextNode('');

this.contextualElement = contextualElement;
this.escaped = true;
this.reset();

@@ -773,3 +786,2 @@ }

this.after = null;
this.escaped = true;
};

@@ -776,0 +788,0 @@

@@ -212,2 +212,8 @@ define("morph",

prototype.createUnsafeMorph = function(parent, start, end, contextualElement){
var morph = this.createMorph(parent, start, end, contextualElement);
morph.escaped = false;
return morph;
};
// This helper is just to keep the templates good looking,

@@ -222,2 +228,8 @@ // passing integers instead of element references.

prototype.createUnsafeMorphAt = function(parent, startIndex, endIndex, contextualElement) {
var morph = this.createMorphAt(parent, startIndex, endIndex, contextualElement);
morph.escaped = false;
return morph;
};
prototype.insertMorphBefore = function(element, referenceChild, contextualElement) {

@@ -593,2 +605,3 @@ var start = this.document.createTextNode('');

this.contextualElement = contextualElement;
this.escaped = true;
this.reset();

@@ -603,3 +616,2 @@ }

this.after = null;
this.escaped = true;
};

@@ -606,0 +618,0 @@

@@ -14,2 +14,3 @@ "use strict";

var TextNode = require("../htmlbars-compiler/ast").TextNode;
var CommentNode = require("../htmlbars-compiler/ast").CommentNode;

@@ -20,7 +21,2 @@ var svgNamespace = "http://www.w3.org/2000/svg";

var stripLeft = { left: true, right: false };
var stripRight = { left: false, right: true };
var stripBoth = { left: true, right: true };
var stripNone = { left: false, right: false };
function id(string) {

@@ -42,3 +38,3 @@ return new IdNode([{ part: string }]);

function mustache(string, pairs, strip, raw) {
function mustache(string, pairs, raw) {
var params;

@@ -52,3 +48,3 @@

return new MustacheNode(params, hash(pairs), raw ? '{{{' : '{{', strip || stripNone);
return new MustacheNode(params, hash(pairs), raw ? '{{{' : '{{');
}

@@ -92,15 +88,19 @@

function block(mustache, program, inverse, strip) {
return new BlockNode(mustache, program, inverse || null, strip || stripNone);
function comment(value) {
return new CommentNode(value);
}
function program(children, strip) {
return new ProgramNode(children || [], strip || stripNone);
function block(mustache, program, inverse) {
return new BlockNode(mustache, program, inverse || null);
}
function program(children, blockParams) {
return new ProgramNode(children || [], blockParams || null);
}
function root(children) {
return program(children || [], {});
return program(children || []);
}
function removeLocInfo(obj) {
function removeLocInfoAndStrip(obj) {
delete obj.firstColumn;

@@ -110,6 +110,7 @@ delete obj.firstLine;

delete obj.lastLine;
delete obj.strip;
for (var k in obj) {
if (obj.hasOwnProperty(k) && obj[k] && typeof obj[k] === 'object') {
removeLocInfo(obj[k]);
removeLocInfoAndStrip(obj[k]);
}

@@ -131,4 +132,4 @@ }

removeLocInfo(actual);
removeLocInfo(expected);
removeLocInfoAndStrip(actual);
removeLocInfoAndStrip(expected);

@@ -290,3 +291,3 @@ deepEqual(actual, expected, message);

text(''),
block(mustache([id('if'), id('foo')]), program([
block(sexpr([id('if'), id('foo')]), program([
element('div', [], [], [

@@ -307,3 +308,3 @@ mustache('content')

text(' content '),
block(mustache([id('testing'), id('shouldRender')]), program([
block(sexpr([id('testing'), id('shouldRender')]), program([
element('p', [], [], [

@@ -338,5 +339,5 @@ text('Appears!')

text(''),
block(mustache([id('three')]), program()),
block(sexpr([id('three')]), program()),
text(''),
block(mustache([id('four')]), program()),
block(sexpr([id('four')]), program()),
text(''),

@@ -352,3 +353,3 @@ mustache([id('five')]),

text('foo'),
mustache([id('content')], null, stripLeft),
mustache([id('content')]),
text(' bar')

@@ -360,3 +361,3 @@ ]));

text('foo '),
mustache([id('content')], null, stripRight),
mustache([id('content')]),
text('bar')

@@ -370,3 +371,3 @@ ]));

text('foo'),
block(mustache([id('wat')], null, stripLeft), program(), null, stripLeft),
block(sexpr([id('wat')]), program()),
text(' bar')

@@ -378,3 +379,3 @@ ]));

text('foo '),
block(mustache([id('wat')]), program(), null, stripRight),
block(sexpr([id('wat')]), program()),
text('bar')

@@ -389,5 +390,5 @@ ]));

text(''),
block(mustache([id('wat')], null, stripRight), program([
block(sexpr([id('wat')]), program([
text('foo ')
], stripLeft), program()),
]), program()),
text('')

@@ -399,5 +400,5 @@ ]));

text(''),
block(mustache([id('wat')]), program([
block(sexpr([id('wat')]), program([
text(' foo')
], stripRight), program()),
]), program()),
text('')

@@ -409,5 +410,5 @@ ]));

text(''),
block(mustache([id('wat')]), program(), program([
block(sexpr([id('wat')]), program(), program([
text('foo ')
], stripLeft)),
])),
text('')

@@ -419,5 +420,5 @@ ]));

text(''),
block(mustache([id('wat')]), program(), program([
block(sexpr([id('wat')]), program(), program([
text(' foo')
], stripRight)),
])),
text('')

@@ -431,5 +432,5 @@ ]));

text(''),
block(mustache([id('each')], null, stripRight), program([
block(sexpr([id('each')]), program([
element('li', [], [], [text(' foo ')])
], stripBoth)),
])),
text('')

@@ -481,2 +482,11 @@ ]));

]));
});
test("an HTML comment", function() {
var t = 'before <!-- some comment --> after';
astEqual(t, root([
text("before "),
comment(" some comment "),
text(" after")
]));
});

@@ -101,2 +101,3 @@ "use strict";

var foo = contentResolves[0];
equal(foo.morph.escaped, true);
equal(foo.morph.parent(), fragment);

@@ -107,7 +108,7 @@ equal(foo.context, context);

deepEqual(foo.hash, {ack:"syn",bar:"baz"});
deepEqual(foo.options.types, ["string","number","id"]);
deepEqual(foo.options.paramTypes, ["string","number","id"]);
deepEqual(foo.options.hashTypes, {ack:"string",bar:"id"});
equal(foo.options.escaped, true);
var baz = contentResolves[1];
equal(baz.morph.escaped, true);
equal(baz.morph.parent(), fragment);

@@ -117,3 +118,2 @@ equal(baz.context, context);

equal(baz.params.length, 0);
equal(baz.options.escaped, true);

@@ -120,0 +120,0 @@ foo.morph.update('A');

@@ -184,6 +184,7 @@ "use strict";

test("The compiler can handle partials in handlebars partial syntax", function() {
registerPartial('partial_name', "<b>Partial Works!</b>");
compilesTo('<div>{{>partial_name}} Plaintext content</div>', '<div><b>Partial Works!</b> Plaintext content</div>', {});
});
// TODO: Revisit partial syntax.
// test("The compiler can handle partials in handlebars partial syntax", function() {
// registerPartial('partial_name', "<b>Partial Works!</b>");
// compilesTo('<div>{{>partial_name}} Plaintext content</div>', '<div><b>Partial Works!</b> Plaintext content</div>', {});
// });

@@ -309,4 +310,4 @@ test("The compiler can handle partials in helper partial syntax", function() {

registerHelper('testing', function(params, hash, options) {
return evalParam(this, params[0], options.types[0]) +
evalParam(this, params[1], options.types[1]);
return evalParam(this, params[0], options.paramTypes[0]) +
evalParam(this, params[1], options.paramTypes[1]);
});

@@ -319,3 +320,3 @@

registerHelper('testing', function(params, hash, options) {
return options.types[0] + '-' + params[0];
return options.paramTypes[0] + '-' + params[0];
});

@@ -337,3 +338,3 @@

test("The compiler passes along the types of the hash arguments", function() {
test("The compiler passes along the paramTypes of the hash arguments", function() {
registerHelper('testing', function(params, hash, options) {

@@ -413,10 +414,10 @@ return options.hashTypes.first + '-' + hash.first;

test("content hook receives escaping information", function() {
test("morph receives escaping information", function() {
expect(3);
hooks.content = function(morph, path, context, params, hash, options) {
hooks.content = function(morph, path) {
if (path === 'escaped') {
equal(options.escaped, true);
equal(morph.escaped, true);
} else if (path === 'unescaped') {
equal(options.escaped, false);
equal(morph.escaped, false);
}

@@ -434,15 +435,39 @@

test("Helpers receive escaping information", function() {
expect(3);
expect(8);
registerHelper('testing', function(params, hash, options) {
if (params[0] === 'escaped') {
equal(options.escaped, true);
} else if (params[0] === 'unescaped') {
equal(options.escaped, false);
function emptyHash(hash) {
for(var key in hash) { // jshint ignore:line
return false;
}
return true;
}
registerHelper('testing-unescaped', function(params, hash, options) {
if (params.length === 0 && emptyHash(hash)) {
//ambiguous mustache
equal(options.morph.escaped, false);
} else {
equal(options.morph.escaped, false);
}
return params[0];
});
compilesTo('<div>{{testing escaped}}-{{{testing unescaped}}}</div>', '<div>escaped-unescaped</div>');
registerHelper('testing-escaped', function(params, hash, options, env) {
if (options.render) {
equal(options.morph.escaped, true);
return options.render({}, env, options.morph.contextualElement);
} else if (params.length === 0 && emptyHash(hash)) {
//ambiguous mustache
equal(options.morph.escaped, true);
} else {
equal(options.morph.escaped, true);
}
return params[0];
});
compilesTo('<div>{{{testing-unescaped}}}-{{{testing-unescaped a}}}</div>', '<div>-a</div>');
compilesTo('<div>{{testing-escaped}}-{{testing-escaped b}}</div>', '<div>-b</div>');
compilesTo('<div>{{#testing-escaped}}c{{/testing-escaped}}</div>', '<div>c</div>');
});

@@ -552,3 +577,3 @@

registerHelper('testing', function(params, hash, options) {
if (options.types[0] === 'id') {
if (options.paramTypes[0] === 'id') {
return this[params[0]];

@@ -626,3 +651,3 @@ } else {

if (options.types[0] === 'id') {
if (options.paramTypes[0] === 'id') {
return this[path] + '.html';

@@ -876,2 +901,24 @@ } else {

test("Block params", function() {
registerHelper('a', function(params, hash, options, env) {
var span = document.createElement('span');
span.appendChild(options.render(this, env, document.body, ['W', 'X1']));
return 'A(' + span.innerHTML + ')';
});
registerHelper('b', function(params, hash, options, env) {
var span = document.createElement('span');
span.appendChild(options.render(this, env, document.body, ['X2', 'Y']));
return 'B(' + span.innerHTML + ')';
});
registerHelper('c', function(params, hash, options, env) {
var span = document.createElement('span');
span.appendChild(options.render(this, env, document.body, ['Z']));
return 'C(' + span.innerHTML + ')';
// return "C(" + options.render() + ")";
});
var t = '{{#a as |w x|}}{{w}},{{x}} {{#b as |x y|}}{{x}},{{y}}{{/b}} {{w}},{{x}} {{#c as |z|}}{{x}},{{z}}{{/c}}{{/a}}';
compilesTo(t, 'A(W,X1 B(X2,Y) W,X1 C(X1,Z))', {});
});
if (document.createElement('div').namespaceURI) {

@@ -878,0 +925,0 @@

@@ -12,11 +12,2 @@ "use strict";

function mustache(name, morphNum) {
return [ 'ambiguous', [name, true, morphNum] ];
}
function helper(name, params, morphNum) {
return [ "helper", [name, params.length, true, morphNum] ];
}
QUnit.module("HydrationOpcodeCompiler opcode generation");

@@ -27,14 +18,28 @@

deepEqual(opcodes, [
[ "morph", [ 0, [ 0 ], -1, 0 ] ],
[ "morph", [ 1, [ 0 ], 0, -1 ] ],
mustache('foo', 0),
mustache('baz', 1)
[ "morph", [ 0, [ 0 ], -1, 0, true ] ],
[ "morph", [ 1, [ 0 ], 0, -1, true ] ],
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
[ "id", [ [ "baz" ] ] ],
[ "ambiguous", [ 1 ] ],
]);
});
test("simple block", function() {
var opcodes = opcodesFor("<div>{{#foo}}{{/foo}}</div>");
deepEqual(opcodes, [
[ "morph", [ 0, [ 0 ], null, null, true ] ],
[ "program", [ 0, null ] ],
[ "id", [ [ "foo" ] ] ],
[ "stackLiteral", [ 0 ] ],
[ "helper", [ 0, 0 ] ]
]);
});
test("element with a sole mustache child", function() {
var opcodes = opcodesFor("<div>{{foo}}</div>");
deepEqual(opcodes, [
[ "morph", [ 0, [ 0 ], -1, -1 ] ],
mustache('foo', 0)
[ "morph", [ 0, [ 0 ], -1, -1, true ] ],
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
]);

@@ -46,4 +51,5 @@ });

deepEqual(opcodes, [
[ "morph", [ 0, [ 0 ], 0, 1 ] ],
mustache('foo', 0)
[ "morph", [ 0, [ 0 ], 0, 1, true ] ],
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
]);

@@ -56,4 +62,5 @@ });

[ "consumeParent", [ 0 ] ],
[ "morph", [ 0, [ 0, 0 ], -1, -1 ] ],
mustache('foo', 0),
[ "morph", [ 0, [ 0, 0 ], -1, -1, true ] ],
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
[ "popParent", [] ]

@@ -67,8 +74,10 @@ ]);

[ "consumeParent", [ 0 ] ],
[ "morph", [ 0, [ 0 ], -1, -1 ] ],
mustache('foo', 0),
[ "morph", [ 0, [ 0 ], -1, -1, true ] ],
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
[ "popParent", [] ],
[ "consumeParent", [ 1 ] ],
[ "morph", [ 1, [ 1 ], -1, -1 ] ],
mustache('bar', 1),
[ "morph", [ 1, [ 1 ], -1, -1, true ] ],
[ "id", [ [ "bar" ] ] ],
[ "ambiguous", [ 1 ] ],
[ "popParent", [] ]

@@ -81,7 +90,9 @@ ]);

deepEqual(opcodes, [
[ "morph", [ 0, [ ], 0, 1 ] ],
[ "morph", [ 1, [ ], 1, 2 ] ],
[ "morph", [ 0, [ ], 0, 1, true ] ],
[ "morph", [ 1, [ ], 1, 2, true ] ],
[ "repairClonedNode", [ [ 0, 2 ] ] ],
mustache('foo', 0),
mustache('bar', 1)
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
[ "id", [ [ "bar" ] ] ],
[ "ambiguous", [ 1 ] ],
]);

@@ -93,11 +104,15 @@ });

deepEqual(opcodes, [
[ "morph", [ 0, [0], -1, 0 ] ],
[ "morph", [ 1, [0], 0, 1 ] ],
[ "morph", [ 2, [0], 1, 2 ] ],
[ "morph", [ 3, [0], 2, -1 ] ],
[ "morph", [ 0, [0], -1, 0, true ] ],
[ "morph", [ 1, [0], 0, 1, true ] ],
[ "morph", [ 2, [0], 1, 2, true ] ],
[ "morph", [ 3, [0], 2, -1, true] ],
[ "repairClonedNode", [ [ 0, 1 ], false ] ],
mustache('foo', 0),
mustache('bar', 1),
mustache('baz', 2),
mustache('qux', 3)
[ "id", [ [ "foo" ] ] ],
[ "ambiguous", [ 0 ] ],
[ "id", [ [ "bar" ] ] ],
[ "ambiguous", [ 1 ] ],
[ "id", [ [ "baz" ] ] ],
[ "ambiguous", [ 2 ] ],
[ "id", [ [ "qux" ] ] ],
[ "ambiguous", [ 3 ] ],
]);

@@ -109,7 +124,8 @@ });

deepEqual(opcodes, [
[ "morph", [ 0, [0], -1, -1 ] ],
[ "morph", [ 0, [0], -1, -1, true ] ],
[ "program", [null, null] ],
[ "id", [ [ "foo" ] ] ],
[ "stringLiteral", ['bar'] ],
[ "stackLiteral", [0] ],
helper('foo', ['bar'], 0)
[ "helper", [ 1, 0 ] ],
]);

@@ -122,5 +138,6 @@ });

[ "program", [null, null] ],
[ "id", [ [ "foo" ] ] ],
[ "stackLiteral", [0] ],
[ "element", [0] ],
[ "nodeHelper", ["foo", 0, 0 ] ]
[ "nodeHelper", [ 0, 0 ] ]
]);

@@ -133,6 +150,7 @@ });

[ "program", [null, null] ],
[ "id", [ [ "foo" ] ] ],
[ "stringLiteral", ['bar'] ],
[ "stackLiteral", [0] ],
[ "element", [0] ],
[ "nodeHelper", ["foo", 1, 0 ] ]
[ "nodeHelper", [ 1, 0 ] ]
]);

@@ -145,16 +163,19 @@ });

[ "program", [null, null] ],
[ "id", [ [ "attribute" ] ] ],
[ "stringLiteral", ["class"] ],
[ "string", ["sexpr"] ],
[ "program", [null, null] ],
[ "id", [ [ "concat" ] ] ],
[ "stringLiteral", ["before "] ],
[ "string", ["sexpr"] ],
[ "program", [null, null] ],
[ "id", [ [ "foo" ] ] ],
[ "stackLiteral", [0] ],
[ "sexpr", [ "foo", 0 ] ],
[ "sexpr", [ 0 ] ],
[ "stringLiteral", [" after"] ],
[ "stackLiteral", [0] ],
[ "sexpr", [ "concat", 3 ] ],
[ "sexpr", [ 3 ] ],
[ "stackLiteral", [0] ],
[ "element", [0] ],
[ "nodeHelper", [ "attribute", 2, 0 ] ]
[ "nodeHelper", [ 2, 0 ] ]
]);

@@ -168,18 +189,21 @@ });

[ "program", [ null, null ] ],
[ "id", [ [ "attribute" ] ] ],
[ "stringLiteral", [ "class" ] ],
[ "string", [ "sexpr" ] ],
[ "program", [ null, null ] ],
[ "id", [ [ "concat" ] ] ],
[ "stringLiteral", [ "before " ] ],
[ "string", [ "sexpr" ] ],
[ "program", [ null, null ] ],
[ "id", [ [ "foo" ] ] ],
[ "stringLiteral", [ "bar" ] ],
[ "stackLiteral", [ 0 ] ],
[ "sexpr", [ "foo", 1 ] ],
[ "sexpr", [ 1 ] ],
[ "stringLiteral", [ " after" ] ],
[ "stackLiteral", [ 0 ] ],
[ "sexpr", [ "concat", 3 ] ],
[ "sexpr", [ 3 ] ],
[ "stackLiteral", [ 0 ] ],
[ "element", [0] ],
[ "nodeHelper", [ "attribute", 2, 0 ] ]
[ "nodeHelper", [ 2, 0 ] ]
]);
});

@@ -25,3 +25,3 @@ "use strict";

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['endProgram', [0]]

@@ -34,3 +34,3 @@ ]);

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['text', [0, 3, false]],

@@ -47,3 +47,3 @@ ['mustache', [1, 3]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['openElement', [0, 2, false, 0, []]],

@@ -64,3 +64,3 @@ ['closeElement', [0, 2, false]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['openElement', [0, 1, true, 2, []]],

@@ -86,5 +86,5 @@ ['openElement', [0, 2, false, 1, []]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['endProgram', [1]],
['startProgram', [1, [0, 1]]],
['startProgram', [1, [0, 1], {}]],
['text', [0, 3, false]],

@@ -100,8 +100,8 @@ ['block', [1, 3]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['endProgram', [1]],
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['text', [0, 1, true]],
['endProgram', [1]],
['startProgram', [2, [0, 1]]],
['startProgram', [2, [0, 1], {}]],
['text', [0, 3, false]],

@@ -117,6 +117,6 @@ ['block', [1, 3]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['text', [0, 1, true]],
['endProgram', [1]],
['startProgram', [0, [0, 1]]],
['startProgram', [0, [0, 1], {}]],
['text', [0, 3, false]],

@@ -126,7 +126,7 @@ ['mustache', [1, 3]],

['endProgram', [2]],
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['openElement', [0, 1, true, 0, []]],
['closeElement', [0, 1, true]],
['endProgram', [2]],
['startProgram', [2, [0, 1, 2]]],
['startProgram', [2, [0, 1, 2], {}]],
['text', [0, 5, false]],

@@ -138,3 +138,3 @@ ['block', [1, 5]],

['endProgram', [1]],
['startProgram', [2, [0, 1, 2]]],
['startProgram', [2, [0, 1, 2], {}]],
['text', [0, 5, false]],

@@ -152,6 +152,6 @@ ['block', [1, 5]],

actionsEqual(input, [
['startProgram', [0, []]],
['startProgram', [0, [], {}]],
['text', [0, 1, true]],
['endProgram', [1]],
['startProgram', [1, [0, 1]]],
['startProgram', [1, [0, 1], {}]],
['text', [0, 3, false]],

@@ -158,0 +158,0 @@ ['component', [1, 3]],

@@ -10,11 +10,12 @@ "use strict";

exports.StringNode = StringNode;
function ProgramNode(statements, strip) {
function ProgramNode(statements, blockParams, strip) {
this.type = 'program';
this.statements = statements;
this.blockParams = blockParams;
this.strip = strip;
}
exports.ProgramNode = ProgramNode;function BlockNode(mustache, program, inverse, strip) {
exports.ProgramNode = ProgramNode;function BlockNode(sexpr, program, inverse, strip) {
this.type = 'block';
this.mustache = mustache;
this.sexpr = sexpr;
this.program = program;

@@ -63,3 +64,8 @@ this.inverse = inverse;

exports.TextNode = TextNode;function childrenFor(node) {
exports.TextNode = TextNode;function CommentNode(chars) {
this.type = 'comment';
this.chars = chars;
}
exports.CommentNode = CommentNode;function childrenFor(node) {
if (node.type === 'program') {

@@ -66,0 +72,0 @@ return node.statements;

@@ -6,7 +6,9 @@ "use strict";

function prepareHelper(stack, size) {
var args = [],
types = [],
var params = [],
paramTypes = [],
hashPairs = [],
hashTypes = [],
keyName,
name,
type,
i;

@@ -23,10 +25,16 @@

for (i=0; i<size; i++) {
args.unshift(stack.pop());
types.unshift(stack.pop());
params.unshift(stack.pop());
paramTypes.unshift(stack.pop());
}
name = stack.pop();
type = stack.pop();
var programId = stack.pop();
var inverseId = stack.pop();
var options = ['types:' + array(types), 'hashTypes:' + hash(hashTypes)];
var options = [];
options.push('type:' + type);
options.push('paramTypes:' + array(paramTypes));
options.push('hashTypes:' + hash(hashTypes));

@@ -42,5 +50,6 @@ if (programId !== null) {

return {
options: options,
args: array(args),
hash: hash(hashPairs)
name: name,
params: array(params),
hash: hash(hashPairs),
options: options
};

@@ -47,0 +56,0 @@ }

@@ -36,3 +36,3 @@ "use strict";

HydrationOpcodeCompiler.prototype.startProgram = function(p, c, blankChildTextNodes) {
HydrationOpcodeCompiler.prototype.startProgram = function(program, c, blankChildTextNodes, scopeVars) {
this.opcodes.length = 0;

@@ -44,2 +44,3 @@ this.paths.length = 0;

this.morphNum = 0;
this.scopeVars = scopeVars;

@@ -97,3 +98,3 @@ if (blankChildTextNodes.length > 0){

var currentDOMChildIndex = this.currentDOMChildIndex,
mustache = block.mustache;
sexpr = block.sexpr;

@@ -104,8 +105,7 @@ var start = (currentDOMChildIndex < 0 ? null : currentDOMChildIndex),

var morphNum = this.morphNum++;
this.morphs.push([morphNum, this.paths.slice(), start, end]);
this.morphs.push([morphNum, this.paths.slice(), start, end, true]);
this.opcode('program', this.templateId++, block.inverse === null ? null : this.templateId++);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helper', mustache.id.string, mustache.params.length, mustache.escaped, morphNum);
processSexpr(this, sexpr);
this.opcode('helper', sexpr.params.length, morphNum);
};

@@ -122,5 +122,11 @@

var id = {
string: component.tag,
parts: component.tag.split('.')
};
this.opcode('program', this.templateId++, null);
this.ID(id);
processHash(this, buildHashFromAttributes(component.attributes));
this.opcode('component', component.tag, morphNum);
this.opcode('component', morphNum);
};

@@ -142,6 +148,9 @@

this.nodeHelper({
params: [attr.name, attr.value.sexpr],
hash: null,
id: {
string: 'attribute'
sexpr: {
params: [attr.name, attr.value.sexpr],
hash: null,
id: {
string: 'attribute',
parts: ['attribute']
}
}

@@ -152,5 +161,5 @@ });

HydrationOpcodeCompiler.prototype.nodeHelper = function(mustache) {
var sexpr = mustache.sexpr;
this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
processSexpr(this, sexpr);
// If we have a helper in a node, and this element has not been cached, cache it

@@ -161,3 +170,3 @@ if(this.element !== null){

}
this.opcode('nodeHelper', mustache.id.string, mustache.params.length, this.elementNum);
this.opcode('nodeHelper', sexpr.params.length, this.elementNum);
};

@@ -172,11 +181,11 @@

var morphNum = this.morphNum++;
this.morphs.push([morphNum, this.paths.slice(), start, end]);
this.morphs.push([morphNum, this.paths.slice(), start, end, mustache.escaped]);
if (mustache.isHelper) {
this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helper', mustache.id.string, mustache.params.length, mustache.escaped, morphNum);
processSexpr(this, mustache);
this.opcode('helper', mustache.params.length, morphNum);
} else {
this.opcode('ambiguous', mustache.id.string, mustache.escaped, morphNum);
this.ID(mustache.id);
this.opcode('ambiguous', morphNum);
}

@@ -188,5 +197,4 @@ };

this.opcode('program', null, null);
processParams(this, sexpr.params);
processHash(this, sexpr.hash);
this.opcode('sexpr', sexpr.id.string, sexpr.params.length);
processSexpr(this, sexpr);
this.opcode('sexpr', sexpr.params.length);
};

@@ -201,7 +209,7 @@

this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helperAttr', mustache.id.string, mustache.params.length, mustache.escaped);
processSexpr(this, mustache);
this.opcode('helperAttr', mustache.params.length);
} else {
this.opcode('ambiguousAttr', mustache.id.string, mustache.escaped);
this.ID(mustache.id);
this.opcode('ambiguousAttr');
}

@@ -211,3 +219,7 @@ };

HydrationOpcodeCompiler.prototype.ID = function(id) {
this.opcode('id', id.parts);
if (id.parts.length > 0 && this.scopeVars[id.parts[0]]) {
this.opcode('scopeId', id.parts);
} else {
this.opcode('id', id.parts);
}
};

@@ -223,6 +235,16 @@

HydrationOpcodeCompiler.prototype.INTEGER = function(integer) {
HydrationOpcodeCompiler.prototype.NUMBER = function(integer) {
this.opcode('literal', integer.stringModeValue);
};
function processSexpr(compiler, sexpr) {
processName(compiler, sexpr.id);
processParams(compiler, sexpr.params);
processHash(compiler, sexpr.hash);
}
function processName(compiler, id) {
compiler.ID(id);
}
function processParams(compiler, params) {

@@ -269,4 +291,3 @@ forEach(params, function(param) {

for (var i = 0; i < morphs.length; ++i) {
var p = morphs[i];
spliceArgs.push(['morph', [p[0], p[1], p[2], p[3]]]);
spliceArgs.push(['morph', morphs[i].slice()]);
}

@@ -273,0 +294,0 @@ opcodes.splice.apply(opcodes, spliceArgs);

@@ -64,2 +64,13 @@ "use strict";

prototype.scopeId = function(parts) {
this.stack.push(string('value'));
var id = '$' + parts[0];
var path = parts.slice(1).join('.');
if (parts.length === 1) {
this.stack.push(id);
} else {
this.stack.push('get(' + id + ', ' + string(path) + ')');
}
};
prototype.literal = function(literal) {

@@ -79,35 +90,37 @@ this.stack.push(string(typeof literal));

prototype.helper = function(name, size, escaped, morphNum) {
prototype.helper = function(size, morphNum) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('escaped:'+escaped);
prepared.options.push('morph:morph'+morphNum);
this.pushMustacheInContent(string(name), prepared.args, prepared.hash, prepared.options, morphNum);
this.pushMustacheInContent(prepared.name, prepared.params, prepared.hash, prepared.options, morphNum);
};
prototype.component = function(tag, morphNum) {
prototype.component = function(morphNum) {
var prepared = prepareHelper(this.stack, 0);
prepared.options.push('morph:morph'+morphNum);
this.pushComponent(string(tag), prepared.hash, prepared.options, morphNum);
this.pushComponent(prepared.name, prepared.hash, prepared.options, morphNum);
};
prototype.ambiguous = function(str, escaped, morphNum) {
prototype.ambiguous = function(morphNum) {
var name = this.stack.pop();
var type = this.stack.pop();
var options = [];
options.push('escaped:'+escaped);
options.push('type:'+type);
options.push('morph:morph'+morphNum);
this.pushMustacheInContent(string(str), '[]', '{}', options, morphNum);
this.pushMustacheInContent(name, '[]', '{}', options, morphNum);
};
prototype.ambiguousAttr = function(str, escaped) {
this.stack.push('['+string(str)+', [], {escaped:'+escaped+'}]');
prototype.ambiguousAttr = function() {
var name = this.stack.pop();
var type = this.stack.pop();
this.stack.push('[' + name + ', [], {}, { type: ' + type + ' }]');
};
prototype.helperAttr = function(name, size, escaped) {
prototype.helperAttr = function(size) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('escaped:'+escaped);
this.stack.push('['+string(name)+','+prepared.args+','+ prepared.hash +',' + hash(prepared.options)+']');
this.stack.push('['+prepared.name+','+prepared.params+','+ prepared.hash +',' + hash(prepared.options)+']');
};
prototype.sexpr = function(name, size) {
prototype.sexpr = function(size) {
var prepared = prepareHelper(this.stack, size);
this.stack.push('hooks.subexpr(' + string(name) + ', context, ' + prepared.args + ', ' + prepared.hash + ',' + hash(prepared.options) + ', env)');
this.stack.push('hooks.subexpr(' + prepared.name + ', context, ' + prepared.params + ', ' + prepared.hash + ',' + hash(prepared.options) + ', env)');
};

@@ -119,13 +132,14 @@

prototype.nodeHelper = function(name, size, elementNum) {
prototype.nodeHelper = function(size, elementNum) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('element:element'+elementNum);
this.pushMustacheInNode(string(name), prepared.args, prepared.hash, prepared.options, elementNum);
this.pushMustacheInNode(prepared.name, prepared.params, prepared.hash, prepared.options, elementNum);
};
prototype.morph = function(num, parentPath, startIndex, endIndex) {
prototype.morph = function(num, parentPath, startIndex, endIndex, escaped) {
var isRoot = parentPath.length === 0;
var parent = this.getParent();
var morph = "dom.createMorphAt("+parent+
var morphMethod = escaped ? 'createMorphAt' : 'createUnsafeMorphAt';
var morph = "dom."+morphMethod+"("+parent+
","+(startIndex === null ? "-1" : startIndex)+

@@ -132,0 +146,0 @@ ","+(endIndex === null ? "-1" : endIndex)+

@@ -22,2 +22,3 @@ "use strict";

this.mustacheCount = 0;
this.scopeVars = null;
this.actions = [];

@@ -93,3 +94,16 @@ }

var programFrame = this.pushFrame();
programFrame.scopeVars = {};
if (parentFrame && parentFrame.scopeVars) {
for (var name in parentFrame.scopeVars) {
programFrame.scopeVars[name] = true;
}
}
if (program.blockParams) {
for (var j = 0; j < program.blockParams.length; j++) {
programFrame.scopeVars[program.blockParams[j]] = true;
}
}
programFrame.parentNode = program;

@@ -107,3 +121,6 @@ programFrame.children = program.statements;

programFrame.actions.push(['startProgram', [
program, programFrame.childTemplateCount, programFrame.blankChildTextNodes.reverse() ]]);
program, programFrame.childTemplateCount,
programFrame.blankChildTextNodes.reverse(),
programFrame.scopeVars
]]);
this.popFrame();

@@ -110,0 +127,0 @@

@@ -28,5 +28,5 @@ "use strict";

TemplateCompiler.prototype.startProgram = function(program, childTemplateCount, blankChildTextNodes) {
this.fragmentOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes);
this.hydrationOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes);
TemplateCompiler.prototype.startProgram = function(program, childTemplateCount, blankChildTextNodes, scopeVars) {
this.fragmentOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes, scopeVars);
this.hydrationOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes, scopeVars);

@@ -39,2 +39,32 @@ this.childTemplates.length = 0;

TemplateCompiler.prototype.getScopeVars = function(indent, blockParams) {
var vars = '';
if (blockParams) {
for (var i = 0; i < blockParams.length; i++) {
vars += indent + 'var $' + blockParams[i] + ';\n';
}
}
return vars;
};
TemplateCompiler.prototype.getChildTemplateVars = function(indent) {
var vars = '';
if (this.childTemplates) {
for (var i = 0; i < this.childTemplates.length; i++) {
vars += indent + 'var child' + i + ' = ' + this.childTemplates[i] + '\n';
}
}
return vars;
};
TemplateCompiler.prototype.getScopeAssignments = function(indent, blockParams) {
var assignments = '';
if (blockParams) {
for (var i = 0; i < blockParams.length; i++) {
assignments += indent + '$' + blockParams[i] + ' = blockArguments[' + i + '];\n';
}
}
return assignments;
};
TemplateCompiler.prototype.endProgram = function(program, programDepth) {

@@ -61,5 +91,8 @@ this.fragmentOpcodeCompiler.endProgram(program);

var childTemplateVars = "";
for (var i=0, l=this.childTemplates.length; i<l; i++) {
childTemplateVars += indent+' var child' + i + ' = ' + this.childTemplates[i] + '\n';
var blockParams = program.blockParams;
var hasBlockParams = blockParams && blockParams.length > 0;
var templateSignature = 'context, env, contextualElement';
if (hasBlockParams) {
templateSignature += ', blockArguments';
}

@@ -69,7 +102,9 @@

'(function() {\n' +
childTemplateVars +
this.getScopeVars(indent + ' ', blockParams) +
this.getChildTemplateVars(indent + ' ') +
fragmentProgram +
indent+' var cachedFragment;\n' +
indent+' return function template(context, env, contextualElement) {\n' +
indent+' var dom = env.dom, hooks = env.hooks;\n' +
indent+' return function template(' + templateSignature + ') {\n' +
indent+' var dom = env.dom, hooks = env.hooks, get = env.get;\n' +
this.getScopeAssignments(indent + ' ', blockParams) +
indent+' dom.detectNamespace(contextualElement);\n' +

@@ -83,3 +118,3 @@ indent+' if (cachedFragment === undefined) {\n' +

indent+' };\n' +
indent+'}());';
indent+'}())';

@@ -86,0 +121,0 @@ this.templates.push(template);

"use strict";
var Exception = require("../exception")["default"];
function LocationInfo(locInfo){
function LocationInfo(locInfo) {
locInfo = locInfo || {};

@@ -13,34 +13,8 @@ this.firstLine = locInfo.first_line;

var AST = {
ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
var inverseLocationInfo, firstInverseNode;
if (arguments.length === 3) {
locInfo = inverse;
inverse = null;
} else if (arguments.length === 2) {
locInfo = inverseStrip;
inverseStrip = null;
}
ProgramNode: function(statements, blockParams, strip, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "program";
this.statements = statements;
this.strip = {};
if(inverse) {
firstInverseNode = inverse[0];
if (firstInverseNode) {
inverseLocationInfo = {
first_line: firstInverseNode.firstLine,
last_line: firstInverseNode.lastLine,
last_column: firstInverseNode.lastColumn,
first_column: firstInverseNode.firstColumn
};
this.inverse = new AST.ProgramNode(inverse, inverseStrip, inverseLocationInfo);
} else {
this.inverse = new AST.ProgramNode(inverse, inverseStrip);
}
this.strip.right = inverseStrip.left;
} else if (inverseStrip) {
this.strip.left = inverseStrip.right;
}
this.blockParams = blockParams;
this.strip = strip;
},

@@ -69,4 +43,2 @@

this.sexpr.isRoot = true;
// Support old AST API that stored this info in MustacheNode

@@ -89,11 +61,11 @@ this.id = this.sexpr.id;

// a mustache is an eligible helper if:
// * its id is simple (a single part, not `this` or `..`)
var eligibleHelper = this.eligibleHelper = id.isSimple;
// a mustache is definitely a helper if:
// * it is an eligible helper, and
// * it has at least one parameter or hash segment
this.isHelper = eligibleHelper && (params.length || hash);
this.isHelper = !!(params.length || hash);
// a mustache is an eligible helper if:
// * its id is simple (a single part, not `this` or `..`)
this.eligibleHelper = this.isHelper || id.isSimple;
// if a mustache is an eligible helper but not a definite

@@ -104,3 +76,3 @@ // helper, it is ambiguous, and will be resolved in a later

PartialNode: function(partialName, context, strip, locInfo) {
PartialNode: function(partialName, context, hash, strip, locInfo) {
LocationInfo.call(this, locInfo);

@@ -110,25 +82,17 @@ this.type = "partial";

this.context = context;
this.hash = hash;
this.strip = strip;
this.strip.inlineStandalone = true;
},
BlockNode: function(mustache, program, inverse, close, locInfo) {
BlockNode: function(sexpr, program, inverse, strip, locInfo) {
LocationInfo.call(this, locInfo);
if(mustache.sexpr.id.original !== close.path.original) {
throw new Exception(mustache.sexpr.id.original + " doesn't match " + close.path.original, this);
}
this.type = 'block';
this.mustache = mustache;
this.sexpr = sexpr;
this.program = program;
this.inverse = inverse;
this.strip = strip;
this.strip = {
left: mustache.strip.left,
right: close.strip.right
};
(program || inverse).strip.left = mustache.strip.right;
(inverse || program).strip.right = close.strip.left;
if (inverse && !program) {

@@ -142,3 +106,3 @@ this.isInverse = true;

this.type = "content";
this.string = string;
this.original = this.string = string;
},

@@ -158,3 +122,4 @@

dig = [],
depth = 0;
depth = 0,
depthString = '';

@@ -170,2 +135,3 @@ for(var i=0,l=parts.length; i<l; i++) {

depth++;
depthString += '../';
} else {

@@ -183,2 +149,3 @@ this.isScoped = true;

this.depth = depth;
this.idName = depthString + this.string;

@@ -202,2 +169,4 @@ // an ID is simple if it only has one part, and that part is not

this.id = id;
this.stringModeValue = id.stringModeValue;
this.idName = '@' + id.stringModeValue;
},

@@ -213,8 +182,8 @@

IntegerNode: function(integer, locInfo) {
NumberNode: function(number, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "INTEGER";
this.type = "NUMBER";
this.original =
this.integer = integer;
this.stringModeValue = Number(integer);
this.number = number;
this.stringModeValue = Number(number);
},

@@ -229,11 +198,15 @@

CommentNode: function(comment, locInfo) {
CommentNode: function(comment, strip, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "comment";
this.comment = comment;
this.strip = strip;
strip.inlineStandalone = true;
}
};
// Must be exported as an object rather than the root of the module as the jison lexer
// most modify the object to operate properly.
exports["default"] = AST;
"use strict";
function __es6_transpiler_warn__(warning) {
if (typeof console === 'undefined') {
} else if (typeof console.warn === "function") {
console.warn(warning);
} else if (typeof console.log === "function") {
console.log(warning);
}
}
function __es6_transpiler_build_module_object__(name, imported) {
var moduleInstanceObject = Object.create ? Object.create(null) : {};
if (typeof imported === "function") {
__es6_transpiler_warn__("imported module '"+name+"' exported a function - this may not work as expected");
}
for (var key in imported) {
if (Object.prototype.hasOwnProperty.call(imported, key)) {
moduleInstanceObject[key] = imported[key];
}
}
if (Object.freeze) {
Object.freeze(moduleInstanceObject);
}
return moduleInstanceObject;
}
var parser = require("./parser")["default"];
var AST = require("./ast")["default"];
var Helpers = __es6_transpiler_build_module_object__("Helpers", require("./helpers"));
var extend = require("../utils").extend;
exports.parser = parser;
var yy = {};
extend(yy, Helpers, AST);
function parse(input) {
// Just return if an already-compile AST was passed in.
if(input.constructor === AST.ProgramNode) { return input; }
if (input.constructor === AST.ProgramNode) { return input; }
parser.yy = AST;
parser.yy = yy;
return parser.parse(input);

@@ -13,0 +42,0 @@ }

"use strict";
/* jshint ignore:start */
/* istanbul ignore next */
/* Jison generated parser */

@@ -7,5 +8,5 @@ var handlebars = (function(){

yy: {},
symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
productions_: [0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],
symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"content":12,"COMMENT":13,"CONTENT":14,"openRawBlock":15,"END_RAW_BLOCK":16,"OPEN_RAW_BLOCK":17,"sexpr":18,"CLOSE_RAW_BLOCK":19,"openBlock":20,"block_option0":21,"closeBlock":22,"openInverse":23,"block_option1":24,"OPEN_BLOCK":25,"openBlock_option0":26,"CLOSE":27,"OPEN_INVERSE":28,"openInverse_option0":29,"openInverseChain":30,"OPEN_INVERSE_CHAIN":31,"inverseAndProgram":32,"INVERSE":33,"inverseChain":34,"inverseChain_option0":35,"OPEN_ENDBLOCK":36,"path":37,"OPEN":38,"OPEN_UNESCAPED":39,"CLOSE_UNESCAPED":40,"OPEN_PARTIAL":41,"partialName":42,"param":43,"partial_option0":44,"partial_option1":45,"sexpr_repetition0":46,"sexpr_option0":47,"dataName":48,"STRING":49,"NUMBER":50,"BOOLEAN":51,"OPEN_SEXPR":52,"CLOSE_SEXPR":53,"hash":54,"hash_repetition_plus0":55,"hashSegment":56,"ID":57,"EQUALS":58,"blockParams":59,"OPEN_BLOCK_PARAMS":60,"blockParams_repetition_plus0":61,"CLOSE_BLOCK_PARAMS":62,"DATA":63,"pathSegments":64,"SEP":65,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",13:"COMMENT",14:"CONTENT",16:"END_RAW_BLOCK",17:"OPEN_RAW_BLOCK",19:"CLOSE_RAW_BLOCK",25:"OPEN_BLOCK",27:"CLOSE",28:"OPEN_INVERSE",31:"OPEN_INVERSE_CHAIN",33:"INVERSE",36:"OPEN_ENDBLOCK",38:"OPEN",39:"OPEN_UNESCAPED",40:"CLOSE_UNESCAPED",41:"OPEN_PARTIAL",49:"STRING",50:"NUMBER",51:"BOOLEAN",52:"OPEN_SEXPR",53:"CLOSE_SEXPR",57:"ID",58:"EQUALS",60:"OPEN_BLOCK_PARAMS",62:"CLOSE_BLOCK_PARAMS",63:"DATA",65:"SEP"},
productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[12,1],[10,3],[15,3],[9,4],[9,4],[20,4],[23,4],[30,3],[32,2],[34,3],[34,1],[22,3],[8,3],[8,3],[11,5],[11,4],[18,3],[18,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,3],[54,1],[56,3],[59,3],[42,1],[42,1],[42,1],[48,2],[37,1],[64,3],[64,1],[6,0],[6,2],[21,0],[21,1],[24,0],[24,1],[26,0],[26,1],[29,0],[29,1],[35,0],[35,1],[44,0],[44,1],[45,0],[45,1],[46,0],[46,2],[47,0],[47,1],[55,1],[55,2],[61,1],[61,2]],
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {

@@ -15,82 +16,93 @@

switch (yystate) {
case 1: return new yy.ProgramNode($$[$0-1], this._$);
case 1: yy.prepareProgram($$[$0-1].statements, true); return $$[$0-1];
break;
case 2: return new yy.ProgramNode([], this._$);
case 2:this.$ = new yy.ProgramNode(yy.prepareProgram($$[$0]), null, {}, this._$);
break;
case 3:this.$ = new yy.ProgramNode([], $$[$0-1], $$[$0], this._$);
case 3:this.$ = $$[$0];
break;
case 4:this.$ = new yy.ProgramNode($$[$0-2], $$[$0-1], $$[$0], this._$);
case 4:this.$ = $$[$0];
break;
case 5:this.$ = new yy.ProgramNode($$[$0-1], $$[$0], [], this._$);
case 5:this.$ = $$[$0];
break;
case 6:this.$ = new yy.ProgramNode($$[$0], this._$);
case 6:this.$ = $$[$0];
break;
case 7:this.$ = new yy.ProgramNode([], this._$);
case 7:this.$ = $$[$0];
break;
case 8:this.$ = new yy.ProgramNode([], this._$);
case 8:this.$ = new yy.CommentNode(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), this._$);
break;
case 9:this.$ = [$$[$0]];
case 9:this.$ = new yy.ContentNode($$[$0], this._$);
break;
case 10: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
case 10:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$);
break;
case 11:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0], this._$);
case 11:this.$ = { sexpr: $$[$0-1] };
break;
case 12:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0], this._$);
case 12:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$);
break;
case 13:this.$ = $$[$0];
case 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$);
break;
case 14:this.$ = $$[$0];
case 14:this.$ = { sexpr: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-3], $$[$0]) };
break;
case 15:this.$ = new yy.ContentNode($$[$0], this._$);
case 15:this.$ = { sexpr: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-3], $$[$0]) };
break;
case 16:this.$ = new yy.CommentNode($$[$0], this._$);
case 16:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 17:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 17:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] };
break;
case 18:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 18:
var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$),
program = new yy.ProgramNode(yy.prepareProgram([inverse]), null, {}, this._$);
program.inverse = inverse;
this.$ = { strip: $$[$0-2].strip, program: program, chain: true };
break;
case 19:this.$ = {path: $$[$0-1], strip: stripFlags($$[$0-2], $$[$0])};
case 19:this.$ = $$[$0];
break;
case 20:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 20:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])};
break;
case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 22:this.$ = new yy.PartialNode($$[$0-2], $$[$0-1], stripFlags($$[$0-3], $$[$0]), this._$);
case 22:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 23:this.$ = stripFlags($$[$0-1], $$[$0]);
case 23:this.$ = new yy.PartialNode($$[$0-3], $$[$0-2], $$[$0-1], yy.stripFlags($$[$0-4], $$[$0]), this._$);
break;
case 24:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);
case 24:this.$ = new yy.PartialNode($$[$0-2], undefined, $$[$0-1], yy.stripFlags($$[$0-3], $$[$0]), this._$);
break;
case 25:this.$ = new yy.SexprNode([$$[$0]], null, this._$);
case 25:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);
break;
case 26:this.$ = $$[$0];
case 26:this.$ = new yy.SexprNode([$$[$0]], null, this._$);
break;
case 27:this.$ = new yy.StringNode($$[$0], this._$);
case 27:this.$ = $$[$0];
break;
case 28:this.$ = new yy.IntegerNode($$[$0], this._$);
case 28:this.$ = new yy.StringNode($$[$0], this._$);
break;
case 29:this.$ = new yy.BooleanNode($$[$0], this._$);
case 29:this.$ = new yy.NumberNode($$[$0], this._$);
break;
case 30:this.$ = $$[$0];
case 30:this.$ = new yy.BooleanNode($$[$0], this._$);
break;
case 31:$$[$0-1].isHelper = true; this.$ = $$[$0-1];
case 31:this.$ = $$[$0];
break;
case 32:this.$ = new yy.HashNode($$[$0], this._$);
case 32:$$[$0-1].isHelper = true; this.$ = $$[$0-1];
break;
case 33:this.$ = [$$[$0-2], $$[$0]];
case 33:this.$ = new yy.HashNode($$[$0], this._$);
break;
case 34:this.$ = new yy.PartialNameNode($$[$0], this._$);
case 34:this.$ = [$$[$0-2], $$[$0]];
break;
case 35:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);
case 35:this.$ = $$[$0-1];
break;
case 36:this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0], this._$));
case 36:this.$ = new yy.PartialNameNode($$[$0], this._$);
break;
case 37:this.$ = new yy.DataNode($$[$0], this._$);
case 37:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);
break;
case 38:this.$ = new yy.IdNode($$[$0], this._$);
case 38:this.$ = new yy.PartialNameNode(new yy.NumberNode($$[$0], this._$));
break;
case 39: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
case 39:this.$ = new yy.DataNode($$[$0], this._$);
break;
case 40:this.$ = [{part: $$[$0]}];
case 40:this.$ = new yy.IdNode($$[$0], this._$);
break;
case 41: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
break;
case 42:this.$ = [{part: $$[$0]}];
break;
case 43:this.$ = [];

@@ -100,10 +112,18 @@ break;

break;
case 47:this.$ = [$$[$0]];
case 59:this.$ = [];
break;
case 48:$$[$0-1].push($$[$0]);
case 60:$$[$0-1].push($$[$0]);
break;
case 63:this.$ = [$$[$0]];
break;
case 64:$$[$0-1].push($$[$0]);
break;
case 65:this.$ = [$$[$0]];
break;
case 66:$$[$0-1].push($$[$0]);
break;
}
},
table: [{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],
defaultActions: {3:[2,2],16:[2,1],50:[2,42]},
table: [{3:1,4:2,5:[2,43],6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],38:[2,43],39:[2,43],41:[2,43]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:[1,11],14:[1,18],15:16,17:[1,21],20:14,23:15,25:[1,19],28:[1,20],31:[2,2],33:[2,2],36:[2,2],38:[1,12],39:[1,13],41:[1,17]},{1:[2,1]},{5:[2,44],13:[2,44],14:[2,44],17:[2,44],25:[2,44],28:[2,44],31:[2,44],33:[2,44],36:[2,44],38:[2,44],39:[2,44],41:[2,44]},{5:[2,3],13:[2,3],14:[2,3],17:[2,3],25:[2,3],28:[2,3],31:[2,3],33:[2,3],36:[2,3],38:[2,3],39:[2,3],41:[2,3]},{5:[2,4],13:[2,4],14:[2,4],17:[2,4],25:[2,4],28:[2,4],31:[2,4],33:[2,4],36:[2,4],38:[2,4],39:[2,4],41:[2,4]},{5:[2,5],13:[2,5],14:[2,5],17:[2,5],25:[2,5],28:[2,5],31:[2,5],33:[2,5],36:[2,5],38:[2,5],39:[2,5],41:[2,5]},{5:[2,6],13:[2,6],14:[2,6],17:[2,6],25:[2,6],28:[2,6],31:[2,6],33:[2,6],36:[2,6],38:[2,6],39:[2,6],41:[2,6]},{5:[2,7],13:[2,7],14:[2,7],17:[2,7],25:[2,7],28:[2,7],31:[2,7],33:[2,7],36:[2,7],38:[2,7],39:[2,7],41:[2,7]},{5:[2,8],13:[2,8],14:[2,8],17:[2,8],25:[2,8],28:[2,8],31:[2,8],33:[2,8],36:[2,8],38:[2,8],39:[2,8],41:[2,8]},{18:22,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:28,37:23,48:24,57:[1,27],63:[1,26],64:25},{4:29,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],31:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{4:30,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{12:31,14:[1,18]},{37:33,42:32,49:[1,34],50:[1,35],57:[1,27],64:25},{5:[2,9],13:[2,9],14:[2,9],16:[2,9],17:[2,9],25:[2,9],28:[2,9],31:[2,9],33:[2,9],36:[2,9],38:[2,9],39:[2,9],41:[2,9]},{18:36,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:37,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:38,37:23,48:24,57:[1,27],63:[1,26],64:25},{27:[1,39]},{19:[2,59],27:[2,59],40:[2,59],46:40,49:[2,59],50:[2,59],51:[2,59],52:[2,59],53:[2,59],57:[2,59],60:[2,59],63:[2,59]},{19:[2,26],27:[2,26],40:[2,26],53:[2,26],60:[2,26]},{19:[2,40],27:[2,40],40:[2,40],49:[2,40],50:[2,40],51:[2,40],52:[2,40],53:[2,40],57:[2,40],60:[2,40],63:[2,40],65:[1,41]},{37:42,57:[1,27],64:25},{19:[2,42],27:[2,42],40:[2,42],49:[2,42],50:[2,42],51:[2,42],52:[2,42],53:[2,42],57:[2,42],60:[2,42],63:[2,42],65:[2,42]},{40:[1,43]},{21:44,30:46,31:[1,48],32:47,33:[1,49],34:45,36:[2,45]},{24:50,32:51,33:[1,49],36:[2,47]},{16:[1,52]},{27:[2,57],37:55,43:53,45:54,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],54:61,55:62,56:64,57:[1,63],63:[1,26],64:25},{27:[2,36],49:[2,36],50:[2,36],51:[2,36],52:[2,36],57:[2,36],63:[2,36]},{27:[2,37],49:[2,37],50:[2,37],51:[2,37],52:[2,37],57:[2,37],63:[2,37]},{27:[2,38],49:[2,38],50:[2,38],51:[2,38],52:[2,38],57:[2,38],63:[2,38]},{26:65,27:[2,49],59:66,60:[1,67]},{27:[2,51],29:68,59:69,60:[1,67]},{19:[1,70]},{5:[2,21],13:[2,21],14:[2,21],17:[2,21],25:[2,21],28:[2,21],31:[2,21],33:[2,21],36:[2,21],38:[2,21],39:[2,21],41:[2,21]},{19:[2,61],27:[2,61],37:55,40:[2,61],43:72,47:71,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],53:[2,61],54:73,55:62,56:64,57:[1,63],60:[2,61],63:[1,26],64:25},{57:[1,74]},{19:[2,39],27:[2,39],40:[2,39],49:[2,39],50:[2,39],51:[2,39],52:[2,39],53:[2,39],57:[2,39],60:[2,39],63:[2,39]},{5:[2,22],13:[2,22],14:[2,22],17:[2,22],25:[2,22],28:[2,22],31:[2,22],33:[2,22],36:[2,22],38:[2,22],39:[2,22],41:[2,22]},{22:75,36:[1,76]},{36:[2,46]},{4:77,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],31:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{36:[2,19]},{18:78,37:23,48:24,57:[1,27],63:[1,26],64:25},{4:79,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{22:80,36:[1,76]},{36:[2,48]},{5:[2,10],13:[2,10],14:[2,10],17:[2,10],25:[2,10],28:[2,10],31:[2,10],33:[2,10],36:[2,10],38:[2,10],39:[2,10],41:[2,10]},{27:[2,55],44:81,54:82,55:62,56:64,57:[1,83]},{27:[1,84]},{19:[2,27],27:[2,27],40:[2,27],49:[2,27],50:[2,27],51:[2,27],52:[2,27],53:[2,27],57:[2,27],60:[2,27],63:[2,27]},{19:[2,28],27:[2,28],40:[2,28],49:[2,28],50:[2,28],51:[2,28],52:[2,28],53:[2,28],57:[2,28],60:[2,28],63:[2,28]},{19:[2,29],27:[2,29],40:[2,29],49:[2,29],50:[2,29],51:[2,29],52:[2,29],53:[2,29],57:[2,29],60:[2,29],63:[2,29]},{19:[2,30],27:[2,30],40:[2,30],49:[2,30],50:[2,30],51:[2,30],52:[2,30],53:[2,30],57:[2,30],60:[2,30],63:[2,30]},{19:[2,31],27:[2,31],40:[2,31],49:[2,31],50:[2,31],51:[2,31],52:[2,31],53:[2,31],57:[2,31],60:[2,31],63:[2,31]},{18:85,37:23,48:24,57:[1,27],63:[1,26],64:25},{27:[2,58]},{19:[2,33],27:[2,33],40:[2,33],53:[2,33],56:86,57:[1,83],60:[2,33]},{19:[2,42],27:[2,42],40:[2,42],49:[2,42],50:[2,42],51:[2,42],52:[2,42],53:[2,42],57:[2,42],58:[1,87],60:[2,42],63:[2,42],65:[2,42]},{19:[2,63],27:[2,63],40:[2,63],53:[2,63],57:[2,63],60:[2,63]},{27:[1,88]},{27:[2,50]},{57:[1,90],61:89},{27:[1,91]},{27:[2,52]},{14:[2,11]},{19:[2,25],27:[2,25],40:[2,25],53:[2,25],60:[2,25]},{19:[2,60],27:[2,60],40:[2,60],49:[2,60],50:[2,60],51:[2,60],52:[2,60],53:[2,60],57:[2,60],60:[2,60],63:[2,60]},{19:[2,62],27:[2,62],40:[2,62],53:[2,62],60:[2,62]},{19:[2,41],27:[2,41],40:[2,41],49:[2,41],50:[2,41],51:[2,41],52:[2,41],53:[2,41],57:[2,41],60:[2,41],63:[2,41],65:[2,41]},{5:[2,12],13:[2,12],14:[2,12],17:[2,12],25:[2,12],28:[2,12],31:[2,12],33:[2,12],36:[2,12],38:[2,12],39:[2,12],41:[2,12]},{37:92,57:[1,27],64:25},{30:46,31:[1,48],32:47,33:[1,49],34:94,35:93,36:[2,53]},{27:[1,95]},{36:[2,17]},{5:[2,13],13:[2,13],14:[2,13],17:[2,13],25:[2,13],28:[2,13],31:[2,13],33:[2,13],36:[2,13],38:[2,13],39:[2,13],41:[2,13]},{27:[1,96]},{27:[2,56]},{58:[1,87]},{5:[2,24],13:[2,24],14:[2,24],17:[2,24],25:[2,24],28:[2,24],31:[2,24],33:[2,24],36:[2,24],38:[2,24],39:[2,24],41:[2,24]},{53:[1,97]},{19:[2,64],27:[2,64],40:[2,64],53:[2,64],57:[2,64],60:[2,64]},{37:55,43:98,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],57:[1,27],63:[1,26],64:25},{13:[2,14],14:[2,14],17:[2,14],25:[2,14],28:[2,14],31:[2,14],33:[2,14],36:[2,14],38:[2,14],39:[2,14],41:[2,14]},{57:[1,100],62:[1,99]},{57:[2,65],62:[2,65]},{13:[2,15],14:[2,15],17:[2,15],25:[2,15],28:[2,15],33:[2,15],36:[2,15],38:[2,15],39:[2,15],41:[2,15]},{27:[1,101]},{36:[2,18]},{36:[2,54]},{13:[2,16],14:[2,16],17:[2,16],25:[2,16],28:[2,16],31:[2,16],33:[2,16],36:[2,16],38:[2,16],39:[2,16],41:[2,16]},{5:[2,23],13:[2,23],14:[2,23],17:[2,23],25:[2,23],28:[2,23],31:[2,23],33:[2,23],36:[2,23],38:[2,23],39:[2,23],41:[2,23]},{19:[2,32],27:[2,32],40:[2,32],49:[2,32],50:[2,32],51:[2,32],52:[2,32],53:[2,32],57:[2,32],60:[2,32],63:[2,32]},{19:[2,34],27:[2,34],40:[2,34],53:[2,34],57:[2,34],60:[2,34]},{27:[2,35]},{57:[2,66],62:[2,66]},{5:[2,20],13:[2,20],14:[2,20],17:[2,20],25:[2,20],28:[2,20],31:[2,20],33:[2,20],36:[2,20],38:[2,20],39:[2,20],41:[2,20]}],
defaultActions: {4:[2,1],45:[2,46],47:[2,19],51:[2,48],61:[2,58],66:[2,50],69:[2,52],70:[2,11],79:[2,17],82:[2,56],93:[2,18],94:[2,54],99:[2,35]},
parseError: function parseError(str, hash) {

@@ -216,11 +236,2 @@ throw new Error(str);

};
function stripFlags(open, close) {
return {
left: open.charAt(2) === '~',
right: close.charAt(0) === '~' || close.charAt(1) === '~'
};
}
/* Jison generated lexer */

@@ -425,66 +436,100 @@ var lexer = (function(){

break;
case 3:strip(0,4); this.popState(); return 15;
case 3:
yy_.yytext = yy_.yytext.substr(5, yy_.yyleng-9);
this.popState();
return 16;
break;
case 4:return 35;
case 4: return 14;
break;
case 5:return 36;
case 5:
this.popState();
return 13;
break;
case 6:return 25;
case 6:return 52;
break;
case 7:return 16;
case 7:return 53;
break;
case 8:return 20;
case 8: return 17;
break;
case 9:return 19;
case 9:
this.popState();
this.begin('raw');
return 19;
break;
case 10:return 19;
case 10:return 41;
break;
case 11:return 23;
case 11:return 25;
break;
case 12:return 22;
case 12:return 36;
break;
case 13:this.popState(); this.begin('com');
case 13:this.popState(); return 33;
break;
case 14:strip(3,5); this.popState(); return 15;
case 14:this.popState(); return 33;
break;
case 15:return 22;
case 15:return 28;
break;
case 16:return 41;
case 16:return 31;
break;
case 17:return 40;
case 17:return 39;
break;
case 18:return 40;
case 18:return 38;
break;
case 19:return 44;
case 19:
this.unput(yy_.yytext);
this.popState();
this.begin('com');
break;
case 20:// ignore whitespace
case 20:
this.popState();
return 13;
break;
case 21:this.popState(); return 24;
case 21:return 38;
break;
case 22:this.popState(); return 18;
case 22:return 58;
break;
case 23:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 32;
case 23:return 57;
break;
case 24:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 32;
case 24:return 57;
break;
case 25:return 42;
case 25:return 65;
break;
case 26:return 34;
case 26:// ignore whitespace
break;
case 27:return 34;
case 27:this.popState(); return 40;
break;
case 28:return 33;
case 28:this.popState(); return 27;
break;
case 29:return 40;
case 29:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 49;
break;
case 30:yy_.yytext = strip(1,2); return 40;
case 30:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 49;
break;
case 31:return 'INVALID';
case 31:return 63;
break;
case 32:return 5;
case 32:return 51;
break;
case 33:return 51;
break;
case 34:return 50;
break;
case 35:return 60;
break;
case 36:return 62;
break;
case 37:return 57;
break;
case 38:yy_.yytext = strip(1,2); return 57;
break;
case 39:return 'INVALID';
break;
case 40:return 5;
break;
}
};
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}};
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
lexer.conditions = {"mu":{"rules":[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[5],"inclusive":false},"raw":{"rules":[3,4],"inclusive":false},"INITIAL":{"rules":[0,1,40],"inclusive":true}};
return lexer;})()

@@ -491,0 +536,0 @@ parser.lexer = lexer;

@@ -14,3 +14,3 @@ "use strict";

var statements = [];
var node = new ProgramNode(statements, program.strip);
var node = new ProgramNode(statements, program.blockParams || null, program.strip);
var i, l = program.statements.length;

@@ -43,3 +43,3 @@

var mustache = block.mustache;
var sexpr = block.sexpr;
var program = this.acceptNode(block.program);

@@ -54,3 +54,3 @@ var inverse = block.inverse ? this.acceptNode(block.inverse) : null;

var node = new BlockNode(mustache, program, inverse, strip);
var node = new BlockNode(sexpr, program, inverse, strip);
var parentProgram = this.currentElement();

@@ -57,0 +57,0 @@ appendChild(parentProgram, node);

@@ -6,2 +6,3 @@ "use strict";

var TextNode = require("../ast").TextNode;
var CommentNode = require("../ast").CommentNode;
var appendChild = require("../ast").appendChild;

@@ -58,3 +59,9 @@ var postprocessProgram = require("./helpers").postprocessProgram;

var tokenHandlers = {
CommentToken: function(token) {
var current = this.currentElement();
var comment = new CommentNode(token.chars);
appendChild(current, comment);
},
Chars: function(token) {

@@ -113,3 +120,3 @@ var current = this.currentElement();

} else {
var program = new ProgramNode(element.children, { left: false, right: false });
var program = new ProgramNode(element.children, null, { left: false, right: false });
postprocessProgram(program);

@@ -116,0 +123,0 @@ var component = new ComponentNode(element.tag, element.attributes, program);

"use strict";
var merge = require("./utils").merge;
var SafeString = require("../htmlbars-util/safe-string")["default"];

@@ -10,7 +9,8 @@ function content(morph, helperName, context, params, hash, options, env) {

} else {
value = this.simple(context, helperName, options);
if (options.type === 'value') {
value = helperName;
} else {
value = this.simple(context, helperName, options);
}
}
if (!options.escaped) {
value = new SafeString(value);
}
morph.update(value);

@@ -65,3 +65,3 @@ }

for (var i = 0, l = params.length; i < l; i++) {
if (options.types[i] === 'id') {
if (options.paramTypes[i] === 'id') {
value += this.simple(this, params[i], options);

@@ -68,0 +68,0 @@ } else {

"use strict";
/*
* @overview HTMLBars
* @copyright Copyright 2011-2014 Tilde Inc. and contributors
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/tildeio/htmlbars/master/LICENSE
* @version 0.1.5
*/
var compile = require("./htmlbars-compiler/compiler").compile;

@@ -3,0 +11,0 @@ var compileSpec = require("./htmlbars-compiler/compiler").compileSpec;

@@ -199,2 +199,8 @@ "use strict";

prototype.createUnsafeMorph = function(parent, start, end, contextualElement){
var morph = this.createMorph(parent, start, end, contextualElement);
morph.escaped = false;
return morph;
};
// This helper is just to keep the templates good looking,

@@ -209,2 +215,8 @@ // passing integers instead of element references.

prototype.createUnsafeMorphAt = function(parent, startIndex, endIndex, contextualElement) {
var morph = this.createMorphAt(parent, startIndex, endIndex, contextualElement);
morph.escaped = false;
return morph;
};
prototype.insertMorphBefore = function(element, referenceChild, contextualElement) {

@@ -211,0 +223,0 @@ var start = this.document.createTextNode('');

@@ -31,2 +31,3 @@ "use strict";

this.contextualElement = contextualElement;
this.escaped = true;
this.reset();

@@ -41,3 +42,2 @@ }

this.after = null;
this.escaped = true;
};

@@ -44,0 +44,0 @@

@@ -9,11 +9,12 @@ import AST from "./handlebars/compiler/ast";

export function ProgramNode(statements, strip) {
export function ProgramNode(statements, blockParams, strip) {
this.type = 'program';
this.statements = statements;
this.blockParams = blockParams;
this.strip = strip;
}
export function BlockNode(mustache, program, inverse, strip) {
export function BlockNode(sexpr, program, inverse, strip) {
this.type = 'block';
this.mustache = mustache;
this.sexpr = sexpr;
this.program = program;

@@ -62,2 +63,7 @@ this.inverse = inverse;

export function CommentNode(chars) {
this.type = 'comment';
this.chars = chars;
}
export function childrenFor(node) {

@@ -64,0 +70,0 @@ if (node.type === 'program') {

import { array, hash } from "./quoting";
export function prepareHelper(stack, size) {
var args = [],
types = [],
var params = [],
paramTypes = [],
hashPairs = [],
hashTypes = [],
keyName,
name,
type,
i;

@@ -20,10 +22,16 @@

for (i=0; i<size; i++) {
args.unshift(stack.pop());
types.unshift(stack.pop());
params.unshift(stack.pop());
paramTypes.unshift(stack.pop());
}
name = stack.pop();
type = stack.pop();
var programId = stack.pop();
var inverseId = stack.pop();
var options = ['types:' + array(types), 'hashTypes:' + hash(hashTypes)];
var options = [];
options.push('type:' + type);
options.push('paramTypes:' + array(paramTypes));
options.push('hashTypes:' + hash(hashTypes));

@@ -39,6 +47,7 @@ if (programId !== null) {

return {
options: options,
args: array(args),
hash: hash(hashPairs)
name: name,
params: array(params),
hash: hash(hashPairs),
options: options
};
}

@@ -35,3 +35,3 @@ import TemplateVisitor from "./template_visitor";

HydrationOpcodeCompiler.prototype.startProgram = function(p, c, blankChildTextNodes) {
HydrationOpcodeCompiler.prototype.startProgram = function(program, c, blankChildTextNodes, scopeVars) {
this.opcodes.length = 0;

@@ -43,2 +43,3 @@ this.paths.length = 0;

this.morphNum = 0;
this.scopeVars = scopeVars;

@@ -96,3 +97,3 @@ if (blankChildTextNodes.length > 0){

var currentDOMChildIndex = this.currentDOMChildIndex,
mustache = block.mustache;
sexpr = block.sexpr;

@@ -103,8 +104,7 @@ var start = (currentDOMChildIndex < 0 ? null : currentDOMChildIndex),

var morphNum = this.morphNum++;
this.morphs.push([morphNum, this.paths.slice(), start, end]);
this.morphs.push([morphNum, this.paths.slice(), start, end, true]);
this.opcode('program', this.templateId++, block.inverse === null ? null : this.templateId++);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helper', mustache.id.string, mustache.params.length, mustache.escaped, morphNum);
processSexpr(this, sexpr);
this.opcode('helper', sexpr.params.length, morphNum);
};

@@ -121,5 +121,11 @@

var id = {
string: component.tag,
parts: component.tag.split('.')
};
this.opcode('program', this.templateId++, null);
this.ID(id);
processHash(this, buildHashFromAttributes(component.attributes));
this.opcode('component', component.tag, morphNum);
this.opcode('component', morphNum);
};

@@ -141,6 +147,9 @@

this.nodeHelper({
params: [attr.name, attr.value.sexpr],
hash: null,
id: {
string: 'attribute'
sexpr: {
params: [attr.name, attr.value.sexpr],
hash: null,
id: {
string: 'attribute',
parts: ['attribute']
}
}

@@ -151,5 +160,5 @@ });

HydrationOpcodeCompiler.prototype.nodeHelper = function(mustache) {
var sexpr = mustache.sexpr;
this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
processSexpr(this, sexpr);
// If we have a helper in a node, and this element has not been cached, cache it

@@ -160,3 +169,3 @@ if(this.element !== null){

}
this.opcode('nodeHelper', mustache.id.string, mustache.params.length, this.elementNum);
this.opcode('nodeHelper', sexpr.params.length, this.elementNum);
};

@@ -171,11 +180,11 @@

var morphNum = this.morphNum++;
this.morphs.push([morphNum, this.paths.slice(), start, end]);
this.morphs.push([morphNum, this.paths.slice(), start, end, mustache.escaped]);
if (mustache.isHelper) {
this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helper', mustache.id.string, mustache.params.length, mustache.escaped, morphNum);
processSexpr(this, mustache);
this.opcode('helper', mustache.params.length, morphNum);
} else {
this.opcode('ambiguous', mustache.id.string, mustache.escaped, morphNum);
this.ID(mustache.id);
this.opcode('ambiguous', morphNum);
}

@@ -187,5 +196,4 @@ };

this.opcode('program', null, null);
processParams(this, sexpr.params);
processHash(this, sexpr.hash);
this.opcode('sexpr', sexpr.id.string, sexpr.params.length);
processSexpr(this, sexpr);
this.opcode('sexpr', sexpr.params.length);
};

@@ -200,7 +208,7 @@

this.opcode('program', null, null);
processParams(this, mustache.params);
processHash(this, mustache.hash);
this.opcode('helperAttr', mustache.id.string, mustache.params.length, mustache.escaped);
processSexpr(this, mustache);
this.opcode('helperAttr', mustache.params.length);
} else {
this.opcode('ambiguousAttr', mustache.id.string, mustache.escaped);
this.ID(mustache.id);
this.opcode('ambiguousAttr');
}

@@ -210,3 +218,7 @@ };

HydrationOpcodeCompiler.prototype.ID = function(id) {
this.opcode('id', id.parts);
if (id.parts.length > 0 && this.scopeVars[id.parts[0]]) {
this.opcode('scopeId', id.parts);
} else {
this.opcode('id', id.parts);
}
};

@@ -222,6 +234,16 @@

HydrationOpcodeCompiler.prototype.INTEGER = function(integer) {
HydrationOpcodeCompiler.prototype.NUMBER = function(integer) {
this.opcode('literal', integer.stringModeValue);
};
function processSexpr(compiler, sexpr) {
processName(compiler, sexpr.id);
processParams(compiler, sexpr.params);
processHash(compiler, sexpr.hash);
}
function processName(compiler, id) {
compiler.ID(id);
}
function processParams(compiler, params) {

@@ -268,4 +290,3 @@ forEach(params, function(param) {

for (var i = 0; i < morphs.length; ++i) {
var p = morphs[i];
spliceArgs.push(['morph', [p[0], p[1], p[2], p[3]]]);
spliceArgs.push(['morph', morphs[i].slice()]);
}

@@ -272,0 +293,0 @@ opcodes.splice.apply(opcodes, spliceArgs);

@@ -61,2 +61,13 @@ import { processOpcodes } from "./utils";

prototype.scopeId = function(parts) {
this.stack.push(string('value'));
var id = '$' + parts[0];
var path = parts.slice(1).join('.');
if (parts.length === 1) {
this.stack.push(id);
} else {
this.stack.push('get(' + id + ', ' + string(path) + ')');
}
};
prototype.literal = function(literal) {

@@ -76,35 +87,37 @@ this.stack.push(string(typeof literal));

prototype.helper = function(name, size, escaped, morphNum) {
prototype.helper = function(size, morphNum) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('escaped:'+escaped);
prepared.options.push('morph:morph'+morphNum);
this.pushMustacheInContent(string(name), prepared.args, prepared.hash, prepared.options, morphNum);
this.pushMustacheInContent(prepared.name, prepared.params, prepared.hash, prepared.options, morphNum);
};
prototype.component = function(tag, morphNum) {
prototype.component = function(morphNum) {
var prepared = prepareHelper(this.stack, 0);
prepared.options.push('morph:morph'+morphNum);
this.pushComponent(string(tag), prepared.hash, prepared.options, morphNum);
this.pushComponent(prepared.name, prepared.hash, prepared.options, morphNum);
};
prototype.ambiguous = function(str, escaped, morphNum) {
prototype.ambiguous = function(morphNum) {
var name = this.stack.pop();
var type = this.stack.pop();
var options = [];
options.push('escaped:'+escaped);
options.push('type:'+type);
options.push('morph:morph'+morphNum);
this.pushMustacheInContent(string(str), '[]', '{}', options, morphNum);
this.pushMustacheInContent(name, '[]', '{}', options, morphNum);
};
prototype.ambiguousAttr = function(str, escaped) {
this.stack.push('['+string(str)+', [], {escaped:'+escaped+'}]');
prototype.ambiguousAttr = function() {
var name = this.stack.pop();
var type = this.stack.pop();
this.stack.push('[' + name + ', [], {}, { type: ' + type + ' }]');
};
prototype.helperAttr = function(name, size, escaped) {
prototype.helperAttr = function(size) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('escaped:'+escaped);
this.stack.push('['+string(name)+','+prepared.args+','+ prepared.hash +',' + hash(prepared.options)+']');
this.stack.push('['+prepared.name+','+prepared.params+','+ prepared.hash +',' + hash(prepared.options)+']');
};
prototype.sexpr = function(name, size) {
prototype.sexpr = function(size) {
var prepared = prepareHelper(this.stack, size);
this.stack.push('hooks.subexpr(' + string(name) + ', context, ' + prepared.args + ', ' + prepared.hash + ',' + hash(prepared.options) + ', env)');
this.stack.push('hooks.subexpr(' + prepared.name + ', context, ' + prepared.params + ', ' + prepared.hash + ',' + hash(prepared.options) + ', env)');
};

@@ -116,13 +129,14 @@

prototype.nodeHelper = function(name, size, elementNum) {
prototype.nodeHelper = function(size, elementNum) {
var prepared = prepareHelper(this.stack, size);
prepared.options.push('element:element'+elementNum);
this.pushMustacheInNode(string(name), prepared.args, prepared.hash, prepared.options, elementNum);
this.pushMustacheInNode(prepared.name, prepared.params, prepared.hash, prepared.options, elementNum);
};
prototype.morph = function(num, parentPath, startIndex, endIndex) {
prototype.morph = function(num, parentPath, startIndex, endIndex, escaped) {
var isRoot = parentPath.length === 0;
var parent = this.getParent();
var morph = "dom.createMorphAt("+parent+
var morphMethod = escaped ? 'createMorphAt' : 'createUnsafeMorphAt';
var morph = "dom."+morphMethod+"("+parent+
","+(startIndex === null ? "-1" : startIndex)+

@@ -129,0 +143,0 @@ ","+(endIndex === null ? "-1" : endIndex)+

@@ -21,2 +21,3 @@ var push = Array.prototype.push;

this.mustacheCount = 0;
this.scopeVars = null;
this.actions = [];

@@ -92,3 +93,16 @@ }

var programFrame = this.pushFrame();
programFrame.scopeVars = {};
if (parentFrame && parentFrame.scopeVars) {
for (var name in parentFrame.scopeVars) {
programFrame.scopeVars[name] = true;
}
}
if (program.blockParams) {
for (var j = 0; j < program.blockParams.length; j++) {
programFrame.scopeVars[program.blockParams[j]] = true;
}
}
programFrame.parentNode = program;

@@ -106,3 +120,6 @@ programFrame.children = program.statements;

programFrame.actions.push(['startProgram', [
program, programFrame.childTemplateCount, programFrame.blankChildTextNodes.reverse() ]]);
program, programFrame.childTemplateCount,
programFrame.blankChildTextNodes.reverse(),
programFrame.scopeVars
]]);
this.popFrame();

@@ -109,0 +126,0 @@

@@ -27,5 +27,5 @@ import { FragmentOpcodeCompiler } from './fragment_opcode';

TemplateCompiler.prototype.startProgram = function(program, childTemplateCount, blankChildTextNodes) {
this.fragmentOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes);
this.hydrationOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes);
TemplateCompiler.prototype.startProgram = function(program, childTemplateCount, blankChildTextNodes, scopeVars) {
this.fragmentOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes, scopeVars);
this.hydrationOpcodeCompiler.startProgram(program, childTemplateCount, blankChildTextNodes, scopeVars);

@@ -38,2 +38,32 @@ this.childTemplates.length = 0;

TemplateCompiler.prototype.getScopeVars = function(indent, blockParams) {
var vars = '';
if (blockParams) {
for (var i = 0; i < blockParams.length; i++) {
vars += indent + 'var $' + blockParams[i] + ';\n';
}
}
return vars;
};
TemplateCompiler.prototype.getChildTemplateVars = function(indent) {
var vars = '';
if (this.childTemplates) {
for (var i = 0; i < this.childTemplates.length; i++) {
vars += indent + 'var child' + i + ' = ' + this.childTemplates[i] + '\n';
}
}
return vars;
};
TemplateCompiler.prototype.getScopeAssignments = function(indent, blockParams) {
var assignments = '';
if (blockParams) {
for (var i = 0; i < blockParams.length; i++) {
assignments += indent + '$' + blockParams[i] + ' = blockArguments[' + i + '];\n';
}
}
return assignments;
};
TemplateCompiler.prototype.endProgram = function(program, programDepth) {

@@ -60,5 +90,8 @@ this.fragmentOpcodeCompiler.endProgram(program);

var childTemplateVars = "";
for (var i=0, l=this.childTemplates.length; i<l; i++) {
childTemplateVars += indent+' var child' + i + ' = ' + this.childTemplates[i] + '\n';
var blockParams = program.blockParams;
var hasBlockParams = blockParams && blockParams.length > 0;
var templateSignature = 'context, env, contextualElement';
if (hasBlockParams) {
templateSignature += ', blockArguments';
}

@@ -68,7 +101,9 @@

'(function() {\n' +
childTemplateVars +
this.getScopeVars(indent + ' ', blockParams) +
this.getChildTemplateVars(indent + ' ') +
fragmentProgram +
indent+' var cachedFragment;\n' +
indent+' return function template(context, env, contextualElement) {\n' +
indent+' var dom = env.dom, hooks = env.hooks;\n' +
indent+' return function template(' + templateSignature + ') {\n' +
indent+' var dom = env.dom, hooks = env.hooks, get = env.get;\n' +
this.getScopeAssignments(indent + ' ', blockParams) +
indent+' dom.detectNamespace(contextualElement);\n' +

@@ -82,3 +117,3 @@ indent+' if (cachedFragment === undefined) {\n' +

indent+' };\n' +
indent+'}());';
indent+'}())';

@@ -85,0 +120,0 @@ this.templates.push(template);

import Exception from "../exception";
function LocationInfo(locInfo){
function LocationInfo(locInfo) {
locInfo = locInfo || {};

@@ -12,34 +12,8 @@ this.firstLine = locInfo.first_line;

var AST = {
ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
var inverseLocationInfo, firstInverseNode;
if (arguments.length === 3) {
locInfo = inverse;
inverse = null;
} else if (arguments.length === 2) {
locInfo = inverseStrip;
inverseStrip = null;
}
ProgramNode: function(statements, blockParams, strip, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "program";
this.statements = statements;
this.strip = {};
if(inverse) {
firstInverseNode = inverse[0];
if (firstInverseNode) {
inverseLocationInfo = {
first_line: firstInverseNode.firstLine,
last_line: firstInverseNode.lastLine,
last_column: firstInverseNode.lastColumn,
first_column: firstInverseNode.firstColumn
};
this.inverse = new AST.ProgramNode(inverse, inverseStrip, inverseLocationInfo);
} else {
this.inverse = new AST.ProgramNode(inverse, inverseStrip);
}
this.strip.right = inverseStrip.left;
} else if (inverseStrip) {
this.strip.left = inverseStrip.right;
}
this.blockParams = blockParams;
this.strip = strip;
},

@@ -68,4 +42,2 @@

this.sexpr.isRoot = true;
// Support old AST API that stored this info in MustacheNode

@@ -88,11 +60,11 @@ this.id = this.sexpr.id;

// a mustache is an eligible helper if:
// * its id is simple (a single part, not `this` or `..`)
var eligibleHelper = this.eligibleHelper = id.isSimple;
// a mustache is definitely a helper if:
// * it is an eligible helper, and
// * it has at least one parameter or hash segment
this.isHelper = eligibleHelper && (params.length || hash);
this.isHelper = !!(params.length || hash);
// a mustache is an eligible helper if:
// * its id is simple (a single part, not `this` or `..`)
this.eligibleHelper = this.isHelper || id.isSimple;
// if a mustache is an eligible helper but not a definite

@@ -103,3 +75,3 @@ // helper, it is ambiguous, and will be resolved in a later

PartialNode: function(partialName, context, strip, locInfo) {
PartialNode: function(partialName, context, hash, strip, locInfo) {
LocationInfo.call(this, locInfo);

@@ -109,25 +81,17 @@ this.type = "partial";

this.context = context;
this.hash = hash;
this.strip = strip;
this.strip.inlineStandalone = true;
},
BlockNode: function(mustache, program, inverse, close, locInfo) {
BlockNode: function(sexpr, program, inverse, strip, locInfo) {
LocationInfo.call(this, locInfo);
if(mustache.sexpr.id.original !== close.path.original) {
throw new Exception(mustache.sexpr.id.original + " doesn't match " + close.path.original, this);
}
this.type = 'block';
this.mustache = mustache;
this.sexpr = sexpr;
this.program = program;
this.inverse = inverse;
this.strip = strip;
this.strip = {
left: mustache.strip.left,
right: close.strip.right
};
(program || inverse).strip.left = mustache.strip.right;
(inverse || program).strip.right = close.strip.left;
if (inverse && !program) {

@@ -141,3 +105,3 @@ this.isInverse = true;

this.type = "content";
this.string = string;
this.original = this.string = string;
},

@@ -157,3 +121,4 @@

dig = [],
depth = 0;
depth = 0,
depthString = '';

@@ -169,2 +134,3 @@ for(var i=0,l=parts.length; i<l; i++) {

depth++;
depthString += '../';
} else {

@@ -182,2 +148,3 @@ this.isScoped = true;

this.depth = depth;
this.idName = depthString + this.string;

@@ -201,2 +168,4 @@ // an ID is simple if it only has one part, and that part is not

this.id = id;
this.stringModeValue = id.stringModeValue;
this.idName = '@' + id.stringModeValue;
},

@@ -212,8 +181,8 @@

IntegerNode: function(integer, locInfo) {
NumberNode: function(number, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "INTEGER";
this.type = "NUMBER";
this.original =
this.integer = integer;
this.stringModeValue = Number(integer);
this.number = number;
this.stringModeValue = Number(number);
},

@@ -228,11 +197,15 @@

CommentNode: function(comment, locInfo) {
CommentNode: function(comment, strip, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "comment";
this.comment = comment;
this.strip = strip;
strip.inlineStandalone = true;
}
};
// Must be exported as an object rather than the root of the module as the jison lexer
// most modify the object to operate properly.
export default AST;
import parser from "./parser";
import AST from "./ast";
module Helpers from "./helpers";
import { extend } from "../utils";
export { parser };
var yy = {};
extend(yy, Helpers, AST);
export function parse(input) {
// Just return if an already-compile AST was passed in.
if(input.constructor === AST.ProgramNode) { return input; }
if (input.constructor === AST.ProgramNode) { return input; }
parser.yy = AST;
parser.yy = yy;
return parser.parse(input);
}
/* jshint ignore:start */
/* istanbul ignore next */
/* Jison generated parser */

@@ -6,5 +7,5 @@ var handlebars = (function(){

yy: {},
symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
productions_: [0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],
symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"content":12,"COMMENT":13,"CONTENT":14,"openRawBlock":15,"END_RAW_BLOCK":16,"OPEN_RAW_BLOCK":17,"sexpr":18,"CLOSE_RAW_BLOCK":19,"openBlock":20,"block_option0":21,"closeBlock":22,"openInverse":23,"block_option1":24,"OPEN_BLOCK":25,"openBlock_option0":26,"CLOSE":27,"OPEN_INVERSE":28,"openInverse_option0":29,"openInverseChain":30,"OPEN_INVERSE_CHAIN":31,"inverseAndProgram":32,"INVERSE":33,"inverseChain":34,"inverseChain_option0":35,"OPEN_ENDBLOCK":36,"path":37,"OPEN":38,"OPEN_UNESCAPED":39,"CLOSE_UNESCAPED":40,"OPEN_PARTIAL":41,"partialName":42,"param":43,"partial_option0":44,"partial_option1":45,"sexpr_repetition0":46,"sexpr_option0":47,"dataName":48,"STRING":49,"NUMBER":50,"BOOLEAN":51,"OPEN_SEXPR":52,"CLOSE_SEXPR":53,"hash":54,"hash_repetition_plus0":55,"hashSegment":56,"ID":57,"EQUALS":58,"blockParams":59,"OPEN_BLOCK_PARAMS":60,"blockParams_repetition_plus0":61,"CLOSE_BLOCK_PARAMS":62,"DATA":63,"pathSegments":64,"SEP":65,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",13:"COMMENT",14:"CONTENT",16:"END_RAW_BLOCK",17:"OPEN_RAW_BLOCK",19:"CLOSE_RAW_BLOCK",25:"OPEN_BLOCK",27:"CLOSE",28:"OPEN_INVERSE",31:"OPEN_INVERSE_CHAIN",33:"INVERSE",36:"OPEN_ENDBLOCK",38:"OPEN",39:"OPEN_UNESCAPED",40:"CLOSE_UNESCAPED",41:"OPEN_PARTIAL",49:"STRING",50:"NUMBER",51:"BOOLEAN",52:"OPEN_SEXPR",53:"CLOSE_SEXPR",57:"ID",58:"EQUALS",60:"OPEN_BLOCK_PARAMS",62:"CLOSE_BLOCK_PARAMS",63:"DATA",65:"SEP"},
productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[12,1],[10,3],[15,3],[9,4],[9,4],[20,4],[23,4],[30,3],[32,2],[34,3],[34,1],[22,3],[8,3],[8,3],[11,5],[11,4],[18,3],[18,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,3],[54,1],[56,3],[59,3],[42,1],[42,1],[42,1],[48,2],[37,1],[64,3],[64,1],[6,0],[6,2],[21,0],[21,1],[24,0],[24,1],[26,0],[26,1],[29,0],[29,1],[35,0],[35,1],[44,0],[44,1],[45,0],[45,1],[46,0],[46,2],[47,0],[47,1],[55,1],[55,2],[61,1],[61,2]],
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {

@@ -14,82 +15,93 @@

switch (yystate) {
case 1: return new yy.ProgramNode($$[$0-1], this._$);
case 1: yy.prepareProgram($$[$0-1].statements, true); return $$[$0-1];
break;
case 2: return new yy.ProgramNode([], this._$);
case 2:this.$ = new yy.ProgramNode(yy.prepareProgram($$[$0]), null, {}, this._$);
break;
case 3:this.$ = new yy.ProgramNode([], $$[$0-1], $$[$0], this._$);
case 3:this.$ = $$[$0];
break;
case 4:this.$ = new yy.ProgramNode($$[$0-2], $$[$0-1], $$[$0], this._$);
case 4:this.$ = $$[$0];
break;
case 5:this.$ = new yy.ProgramNode($$[$0-1], $$[$0], [], this._$);
case 5:this.$ = $$[$0];
break;
case 6:this.$ = new yy.ProgramNode($$[$0], this._$);
case 6:this.$ = $$[$0];
break;
case 7:this.$ = new yy.ProgramNode([], this._$);
case 7:this.$ = $$[$0];
break;
case 8:this.$ = new yy.ProgramNode([], this._$);
case 8:this.$ = new yy.CommentNode(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), this._$);
break;
case 9:this.$ = [$$[$0]];
case 9:this.$ = new yy.ContentNode($$[$0], this._$);
break;
case 10: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
case 10:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$);
break;
case 11:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0], this._$);
case 11:this.$ = { sexpr: $$[$0-1] };
break;
case 12:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0], this._$);
case 12:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$);
break;
case 13:this.$ = $$[$0];
case 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$);
break;
case 14:this.$ = $$[$0];
case 14:this.$ = { sexpr: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-3], $$[$0]) };
break;
case 15:this.$ = new yy.ContentNode($$[$0], this._$);
case 15:this.$ = { sexpr: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-3], $$[$0]) };
break;
case 16:this.$ = new yy.CommentNode($$[$0], this._$);
case 16:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 17:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 17:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] };
break;
case 18:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 18:
var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$),
program = new yy.ProgramNode(yy.prepareProgram([inverse]), null, {}, this._$);
program.inverse = inverse;
this.$ = { strip: $$[$0-2].strip, program: program, chain: true };
break;
case 19:this.$ = {path: $$[$0-1], strip: stripFlags($$[$0-2], $$[$0])};
case 19:this.$ = $$[$0];
break;
case 20:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 20:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])};
break;
case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$);
case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 22:this.$ = new yy.PartialNode($$[$0-2], $$[$0-1], stripFlags($$[$0-3], $$[$0]), this._$);
case 22:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);
break;
case 23:this.$ = stripFlags($$[$0-1], $$[$0]);
case 23:this.$ = new yy.PartialNode($$[$0-3], $$[$0-2], $$[$0-1], yy.stripFlags($$[$0-4], $$[$0]), this._$);
break;
case 24:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);
case 24:this.$ = new yy.PartialNode($$[$0-2], undefined, $$[$0-1], yy.stripFlags($$[$0-3], $$[$0]), this._$);
break;
case 25:this.$ = new yy.SexprNode([$$[$0]], null, this._$);
case 25:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);
break;
case 26:this.$ = $$[$0];
case 26:this.$ = new yy.SexprNode([$$[$0]], null, this._$);
break;
case 27:this.$ = new yy.StringNode($$[$0], this._$);
case 27:this.$ = $$[$0];
break;
case 28:this.$ = new yy.IntegerNode($$[$0], this._$);
case 28:this.$ = new yy.StringNode($$[$0], this._$);
break;
case 29:this.$ = new yy.BooleanNode($$[$0], this._$);
case 29:this.$ = new yy.NumberNode($$[$0], this._$);
break;
case 30:this.$ = $$[$0];
case 30:this.$ = new yy.BooleanNode($$[$0], this._$);
break;
case 31:$$[$0-1].isHelper = true; this.$ = $$[$0-1];
case 31:this.$ = $$[$0];
break;
case 32:this.$ = new yy.HashNode($$[$0], this._$);
case 32:$$[$0-1].isHelper = true; this.$ = $$[$0-1];
break;
case 33:this.$ = [$$[$0-2], $$[$0]];
case 33:this.$ = new yy.HashNode($$[$0], this._$);
break;
case 34:this.$ = new yy.PartialNameNode($$[$0], this._$);
case 34:this.$ = [$$[$0-2], $$[$0]];
break;
case 35:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);
case 35:this.$ = $$[$0-1];
break;
case 36:this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0], this._$));
case 36:this.$ = new yy.PartialNameNode($$[$0], this._$);
break;
case 37:this.$ = new yy.DataNode($$[$0], this._$);
case 37:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);
break;
case 38:this.$ = new yy.IdNode($$[$0], this._$);
case 38:this.$ = new yy.PartialNameNode(new yy.NumberNode($$[$0], this._$));
break;
case 39: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
case 39:this.$ = new yy.DataNode($$[$0], this._$);
break;
case 40:this.$ = [{part: $$[$0]}];
case 40:this.$ = new yy.IdNode($$[$0], this._$);
break;
case 41: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
break;
case 42:this.$ = [{part: $$[$0]}];
break;
case 43:this.$ = [];

@@ -99,10 +111,18 @@ break;

break;
case 47:this.$ = [$$[$0]];
case 59:this.$ = [];
break;
case 48:$$[$0-1].push($$[$0]);
case 60:$$[$0-1].push($$[$0]);
break;
case 63:this.$ = [$$[$0]];
break;
case 64:$$[$0-1].push($$[$0]);
break;
case 65:this.$ = [$$[$0]];
break;
case 66:$$[$0-1].push($$[$0]);
break;
}
},
table: [{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],
defaultActions: {3:[2,2],16:[2,1],50:[2,42]},
table: [{3:1,4:2,5:[2,43],6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],38:[2,43],39:[2,43],41:[2,43]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:[1,11],14:[1,18],15:16,17:[1,21],20:14,23:15,25:[1,19],28:[1,20],31:[2,2],33:[2,2],36:[2,2],38:[1,12],39:[1,13],41:[1,17]},{1:[2,1]},{5:[2,44],13:[2,44],14:[2,44],17:[2,44],25:[2,44],28:[2,44],31:[2,44],33:[2,44],36:[2,44],38:[2,44],39:[2,44],41:[2,44]},{5:[2,3],13:[2,3],14:[2,3],17:[2,3],25:[2,3],28:[2,3],31:[2,3],33:[2,3],36:[2,3],38:[2,3],39:[2,3],41:[2,3]},{5:[2,4],13:[2,4],14:[2,4],17:[2,4],25:[2,4],28:[2,4],31:[2,4],33:[2,4],36:[2,4],38:[2,4],39:[2,4],41:[2,4]},{5:[2,5],13:[2,5],14:[2,5],17:[2,5],25:[2,5],28:[2,5],31:[2,5],33:[2,5],36:[2,5],38:[2,5],39:[2,5],41:[2,5]},{5:[2,6],13:[2,6],14:[2,6],17:[2,6],25:[2,6],28:[2,6],31:[2,6],33:[2,6],36:[2,6],38:[2,6],39:[2,6],41:[2,6]},{5:[2,7],13:[2,7],14:[2,7],17:[2,7],25:[2,7],28:[2,7],31:[2,7],33:[2,7],36:[2,7],38:[2,7],39:[2,7],41:[2,7]},{5:[2,8],13:[2,8],14:[2,8],17:[2,8],25:[2,8],28:[2,8],31:[2,8],33:[2,8],36:[2,8],38:[2,8],39:[2,8],41:[2,8]},{18:22,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:28,37:23,48:24,57:[1,27],63:[1,26],64:25},{4:29,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],31:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{4:30,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{12:31,14:[1,18]},{37:33,42:32,49:[1,34],50:[1,35],57:[1,27],64:25},{5:[2,9],13:[2,9],14:[2,9],16:[2,9],17:[2,9],25:[2,9],28:[2,9],31:[2,9],33:[2,9],36:[2,9],38:[2,9],39:[2,9],41:[2,9]},{18:36,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:37,37:23,48:24,57:[1,27],63:[1,26],64:25},{18:38,37:23,48:24,57:[1,27],63:[1,26],64:25},{27:[1,39]},{19:[2,59],27:[2,59],40:[2,59],46:40,49:[2,59],50:[2,59],51:[2,59],52:[2,59],53:[2,59],57:[2,59],60:[2,59],63:[2,59]},{19:[2,26],27:[2,26],40:[2,26],53:[2,26],60:[2,26]},{19:[2,40],27:[2,40],40:[2,40],49:[2,40],50:[2,40],51:[2,40],52:[2,40],53:[2,40],57:[2,40],60:[2,40],63:[2,40],65:[1,41]},{37:42,57:[1,27],64:25},{19:[2,42],27:[2,42],40:[2,42],49:[2,42],50:[2,42],51:[2,42],52:[2,42],53:[2,42],57:[2,42],60:[2,42],63:[2,42],65:[2,42]},{40:[1,43]},{21:44,30:46,31:[1,48],32:47,33:[1,49],34:45,36:[2,45]},{24:50,32:51,33:[1,49],36:[2,47]},{16:[1,52]},{27:[2,57],37:55,43:53,45:54,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],54:61,55:62,56:64,57:[1,63],63:[1,26],64:25},{27:[2,36],49:[2,36],50:[2,36],51:[2,36],52:[2,36],57:[2,36],63:[2,36]},{27:[2,37],49:[2,37],50:[2,37],51:[2,37],52:[2,37],57:[2,37],63:[2,37]},{27:[2,38],49:[2,38],50:[2,38],51:[2,38],52:[2,38],57:[2,38],63:[2,38]},{26:65,27:[2,49],59:66,60:[1,67]},{27:[2,51],29:68,59:69,60:[1,67]},{19:[1,70]},{5:[2,21],13:[2,21],14:[2,21],17:[2,21],25:[2,21],28:[2,21],31:[2,21],33:[2,21],36:[2,21],38:[2,21],39:[2,21],41:[2,21]},{19:[2,61],27:[2,61],37:55,40:[2,61],43:72,47:71,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],53:[2,61],54:73,55:62,56:64,57:[1,63],60:[2,61],63:[1,26],64:25},{57:[1,74]},{19:[2,39],27:[2,39],40:[2,39],49:[2,39],50:[2,39],51:[2,39],52:[2,39],53:[2,39],57:[2,39],60:[2,39],63:[2,39]},{5:[2,22],13:[2,22],14:[2,22],17:[2,22],25:[2,22],28:[2,22],31:[2,22],33:[2,22],36:[2,22],38:[2,22],39:[2,22],41:[2,22]},{22:75,36:[1,76]},{36:[2,46]},{4:77,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],31:[2,43],33:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{36:[2,19]},{18:78,37:23,48:24,57:[1,27],63:[1,26],64:25},{4:79,6:3,13:[2,43],14:[2,43],17:[2,43],25:[2,43],28:[2,43],36:[2,43],38:[2,43],39:[2,43],41:[2,43]},{22:80,36:[1,76]},{36:[2,48]},{5:[2,10],13:[2,10],14:[2,10],17:[2,10],25:[2,10],28:[2,10],31:[2,10],33:[2,10],36:[2,10],38:[2,10],39:[2,10],41:[2,10]},{27:[2,55],44:81,54:82,55:62,56:64,57:[1,83]},{27:[1,84]},{19:[2,27],27:[2,27],40:[2,27],49:[2,27],50:[2,27],51:[2,27],52:[2,27],53:[2,27],57:[2,27],60:[2,27],63:[2,27]},{19:[2,28],27:[2,28],40:[2,28],49:[2,28],50:[2,28],51:[2,28],52:[2,28],53:[2,28],57:[2,28],60:[2,28],63:[2,28]},{19:[2,29],27:[2,29],40:[2,29],49:[2,29],50:[2,29],51:[2,29],52:[2,29],53:[2,29],57:[2,29],60:[2,29],63:[2,29]},{19:[2,30],27:[2,30],40:[2,30],49:[2,30],50:[2,30],51:[2,30],52:[2,30],53:[2,30],57:[2,30],60:[2,30],63:[2,30]},{19:[2,31],27:[2,31],40:[2,31],49:[2,31],50:[2,31],51:[2,31],52:[2,31],53:[2,31],57:[2,31],60:[2,31],63:[2,31]},{18:85,37:23,48:24,57:[1,27],63:[1,26],64:25},{27:[2,58]},{19:[2,33],27:[2,33],40:[2,33],53:[2,33],56:86,57:[1,83],60:[2,33]},{19:[2,42],27:[2,42],40:[2,42],49:[2,42],50:[2,42],51:[2,42],52:[2,42],53:[2,42],57:[2,42],58:[1,87],60:[2,42],63:[2,42],65:[2,42]},{19:[2,63],27:[2,63],40:[2,63],53:[2,63],57:[2,63],60:[2,63]},{27:[1,88]},{27:[2,50]},{57:[1,90],61:89},{27:[1,91]},{27:[2,52]},{14:[2,11]},{19:[2,25],27:[2,25],40:[2,25],53:[2,25],60:[2,25]},{19:[2,60],27:[2,60],40:[2,60],49:[2,60],50:[2,60],51:[2,60],52:[2,60],53:[2,60],57:[2,60],60:[2,60],63:[2,60]},{19:[2,62],27:[2,62],40:[2,62],53:[2,62],60:[2,62]},{19:[2,41],27:[2,41],40:[2,41],49:[2,41],50:[2,41],51:[2,41],52:[2,41],53:[2,41],57:[2,41],60:[2,41],63:[2,41],65:[2,41]},{5:[2,12],13:[2,12],14:[2,12],17:[2,12],25:[2,12],28:[2,12],31:[2,12],33:[2,12],36:[2,12],38:[2,12],39:[2,12],41:[2,12]},{37:92,57:[1,27],64:25},{30:46,31:[1,48],32:47,33:[1,49],34:94,35:93,36:[2,53]},{27:[1,95]},{36:[2,17]},{5:[2,13],13:[2,13],14:[2,13],17:[2,13],25:[2,13],28:[2,13],31:[2,13],33:[2,13],36:[2,13],38:[2,13],39:[2,13],41:[2,13]},{27:[1,96]},{27:[2,56]},{58:[1,87]},{5:[2,24],13:[2,24],14:[2,24],17:[2,24],25:[2,24],28:[2,24],31:[2,24],33:[2,24],36:[2,24],38:[2,24],39:[2,24],41:[2,24]},{53:[1,97]},{19:[2,64],27:[2,64],40:[2,64],53:[2,64],57:[2,64],60:[2,64]},{37:55,43:98,48:59,49:[1,56],50:[1,57],51:[1,58],52:[1,60],57:[1,27],63:[1,26],64:25},{13:[2,14],14:[2,14],17:[2,14],25:[2,14],28:[2,14],31:[2,14],33:[2,14],36:[2,14],38:[2,14],39:[2,14],41:[2,14]},{57:[1,100],62:[1,99]},{57:[2,65],62:[2,65]},{13:[2,15],14:[2,15],17:[2,15],25:[2,15],28:[2,15],33:[2,15],36:[2,15],38:[2,15],39:[2,15],41:[2,15]},{27:[1,101]},{36:[2,18]},{36:[2,54]},{13:[2,16],14:[2,16],17:[2,16],25:[2,16],28:[2,16],31:[2,16],33:[2,16],36:[2,16],38:[2,16],39:[2,16],41:[2,16]},{5:[2,23],13:[2,23],14:[2,23],17:[2,23],25:[2,23],28:[2,23],31:[2,23],33:[2,23],36:[2,23],38:[2,23],39:[2,23],41:[2,23]},{19:[2,32],27:[2,32],40:[2,32],49:[2,32],50:[2,32],51:[2,32],52:[2,32],53:[2,32],57:[2,32],60:[2,32],63:[2,32]},{19:[2,34],27:[2,34],40:[2,34],53:[2,34],57:[2,34],60:[2,34]},{27:[2,35]},{57:[2,66],62:[2,66]},{5:[2,20],13:[2,20],14:[2,20],17:[2,20],25:[2,20],28:[2,20],31:[2,20],33:[2,20],36:[2,20],38:[2,20],39:[2,20],41:[2,20]}],
defaultActions: {4:[2,1],45:[2,46],47:[2,19],51:[2,48],61:[2,58],66:[2,50],69:[2,52],70:[2,11],79:[2,17],82:[2,56],93:[2,18],94:[2,54],99:[2,35]},
parseError: function parseError(str, hash) {

@@ -215,11 +235,2 @@ throw new Error(str);

};
function stripFlags(open, close) {
return {
left: open.charAt(2) === '~',
right: close.charAt(0) === '~' || close.charAt(1) === '~'
};
}
/* Jison generated lexer */

@@ -424,66 +435,100 @@ var lexer = (function(){

break;
case 3:strip(0,4); this.popState(); return 15;
case 3:
yy_.yytext = yy_.yytext.substr(5, yy_.yyleng-9);
this.popState();
return 16;
break;
case 4:return 35;
case 4: return 14;
break;
case 5:return 36;
case 5:
this.popState();
return 13;
break;
case 6:return 25;
case 6:return 52;
break;
case 7:return 16;
case 7:return 53;
break;
case 8:return 20;
case 8: return 17;
break;
case 9:return 19;
case 9:
this.popState();
this.begin('raw');
return 19;
break;
case 10:return 19;
case 10:return 41;
break;
case 11:return 23;
case 11:return 25;
break;
case 12:return 22;
case 12:return 36;
break;
case 13:this.popState(); this.begin('com');
case 13:this.popState(); return 33;
break;
case 14:strip(3,5); this.popState(); return 15;
case 14:this.popState(); return 33;
break;
case 15:return 22;
case 15:return 28;
break;
case 16:return 41;
case 16:return 31;
break;
case 17:return 40;
case 17:return 39;
break;
case 18:return 40;
case 18:return 38;
break;
case 19:return 44;
case 19:
this.unput(yy_.yytext);
this.popState();
this.begin('com');
break;
case 20:// ignore whitespace
case 20:
this.popState();
return 13;
break;
case 21:this.popState(); return 24;
case 21:return 38;
break;
case 22:this.popState(); return 18;
case 22:return 58;
break;
case 23:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 32;
case 23:return 57;
break;
case 24:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 32;
case 24:return 57;
break;
case 25:return 42;
case 25:return 65;
break;
case 26:return 34;
case 26:// ignore whitespace
break;
case 27:return 34;
case 27:this.popState(); return 40;
break;
case 28:return 33;
case 28:this.popState(); return 27;
break;
case 29:return 40;
case 29:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 49;
break;
case 30:yy_.yytext = strip(1,2); return 40;
case 30:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 49;
break;
case 31:return 'INVALID';
case 31:return 63;
break;
case 32:return 5;
case 32:return 51;
break;
case 33:return 51;
break;
case 34:return 50;
break;
case 35:return 60;
break;
case 36:return 62;
break;
case 37:return 57;
break;
case 38:yy_.yytext = strip(1,2); return 57;
break;
case 39:return 'INVALID';
break;
case 40:return 5;
break;
}
};
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}};
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
lexer.conditions = {"mu":{"rules":[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[5],"inclusive":false},"raw":{"rules":[3,4],"inclusive":false},"INITIAL":{"rules":[0,1,40],"inclusive":true}};
return lexer;})()

@@ -490,0 +535,0 @@ parser.lexer = lexer;

@@ -10,3 +10,3 @@ import { BlockNode, ProgramNode, PartialNode, appendChild } from "../ast";

var statements = [];
var node = new ProgramNode(statements, program.strip);
var node = new ProgramNode(statements, program.blockParams || null, program.strip);
var i, l = program.statements.length;

@@ -39,3 +39,3 @@

var mustache = block.mustache;
var sexpr = block.sexpr;
var program = this.acceptNode(block.program);

@@ -50,3 +50,3 @@ var inverse = block.inverse ? this.acceptNode(block.inverse) : null;

var node = new BlockNode(mustache, program, inverse, strip);
var node = new BlockNode(sexpr, program, inverse, strip);
var parentProgram = this.currentElement();

@@ -53,0 +53,0 @@ appendChild(parentProgram, node);

@@ -1,2 +0,9 @@

import { ProgramNode, ComponentNode, ElementNode, TextNode, appendChild } from "../ast";
import {
ProgramNode,
ComponentNode,
ElementNode,
TextNode,
CommentNode,
appendChild
} from "../ast";
import { postprocessProgram } from "./helpers";

@@ -52,3 +59,9 @@ import { forEach } from "../utils";

var tokenHandlers = {
CommentToken: function(token) {
var current = this.currentElement();
var comment = new CommentNode(token.chars);
appendChild(current, comment);
},
Chars: function(token) {

@@ -107,3 +120,3 @@ var current = this.currentElement();

} else {
var program = new ProgramNode(element.children, { left: false, right: false });
var program = new ProgramNode(element.children, null, { left: false, right: false });
postprocessProgram(program);

@@ -110,0 +123,0 @@ var component = new ComponentNode(element.tag, element.attributes, program);

import { merge } from "./utils";
import SafeString from '../htmlbars-util/safe-string';

@@ -9,7 +8,8 @@ export function content(morph, helperName, context, params, hash, options, env) {

} else {
value = this.simple(context, helperName, options);
if (options.type === 'value') {
value = helperName;
} else {
value = this.simple(context, helperName, options);
}
}
if (!options.escaped) {
value = new SafeString(value);
}
morph.update(value);

@@ -64,3 +64,3 @@ }

for (var i = 0, l = params.length; i < l; i++) {
if (options.types[i] === 'id') {
if (options.paramTypes[i] === 'id') {
value += this.simple(this, params[i], options);

@@ -67,0 +67,0 @@ } else {

@@ -0,1 +1,9 @@

/*
* @overview HTMLBars
* @copyright Copyright 2011-2014 Tilde Inc. and contributors
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/tildeio/htmlbars/master/LICENSE
* @version 0.1.5
*/
import {compile, compileSpec} from "./htmlbars-compiler/compiler";

@@ -2,0 +10,0 @@ import Morph from "./morph/morph";

@@ -200,2 +200,8 @@ /* global window:false */

prototype.createUnsafeMorph = function(parent, start, end, contextualElement){
var morph = this.createMorph(parent, start, end, contextualElement);
morph.escaped = false;
return morph;
};
// This helper is just to keep the templates good looking,

@@ -210,2 +216,8 @@ // passing integers instead of element references.

prototype.createUnsafeMorphAt = function(parent, startIndex, endIndex, contextualElement) {
var morph = this.createMorphAt(parent, startIndex, endIndex, contextualElement);
morph.escaped = false;
return morph;
};
prototype.insertMorphBefore = function(element, referenceChild, contextualElement) {

@@ -212,0 +224,0 @@ var start = this.document.createTextNode('');

@@ -30,2 +30,3 @@ var splice = Array.prototype.splice;

this.contextualElement = contextualElement;
this.escaped = true;
this.reset();

@@ -40,3 +41,2 @@ }

this.after = null;
this.escaped = true;
};

@@ -43,0 +43,0 @@

@@ -0,1 +1,28 @@

define("htmlbars-runtime-tests/htmlbars-runtime.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime-tests');
test('htmlbars-runtime-tests/htmlbars-runtime.js should pass jshint', function() {
ok(true, 'htmlbars-runtime-tests/htmlbars-runtime.js should pass jshint.');
});
});
define("htmlbars-runtime-tests/htmlbars-runtime/hooks.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime-tests/htmlbars-runtime');
test('htmlbars-runtime-tests/htmlbars-runtime/hooks.js should pass jshint', function() {
ok(true, 'htmlbars-runtime-tests/htmlbars-runtime/hooks.js should pass jshint.');
});
});
define("htmlbars-runtime-tests/htmlbars-runtime/utils.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime-tests/htmlbars-runtime');
test('htmlbars-runtime-tests/htmlbars-runtime/utils.js should pass jshint', function() {
ok(true, 'htmlbars-runtime-tests/htmlbars-runtime/utils.js should pass jshint.');
});
});
define("htmlbars-runtime-tests/main-test",

@@ -36,20 +63,2 @@ ["../htmlbars-runtime"],

});
});
define("htmlbars-runtime/hooks.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime');
test('htmlbars-runtime/hooks.js should pass jshint', function() {
ok(true, 'htmlbars-runtime/hooks.js should pass jshint.');
});
});
define("htmlbars-runtime/utils.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime');
test('htmlbars-runtime/utils.js should pass jshint', function() {
ok(true, 'htmlbars-runtime/utils.js should pass jshint.');
});
});

@@ -0,1 +1,10 @@

define("htmlbars-test-helpers-tests/htmlbars-test-helpers.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-test-helpers-tests');
test('htmlbars-test-helpers-tests/htmlbars-test-helpers.js should pass jshint', function() {
ok(true, 'htmlbars-test-helpers-tests/htmlbars-test-helpers.js should pass jshint.');
});
});
define("htmlbars-test-helpers-tests/main-test",

@@ -15,11 +24,2 @@ [],

});
});
define("htmlbars-test-helpers.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-test-helpers.js should pass jshint', function() {
ok(true, 'htmlbars-test-helpers.js should pass jshint.');
});
});

@@ -1,181 +0,190 @@

define("htmlbars-compiler.jshint",
define("htmlbars-tests/htmlbars-compiler.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-compiler.js should pass jshint', function() {
ok(true, 'htmlbars-compiler.js should pass jshint.');
module('JSHint - htmlbars-tests');
test('htmlbars-tests/htmlbars-compiler.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler.js should pass jshint.');
});
});
define("htmlbars-compiler/ast.jshint",
define("htmlbars-tests/htmlbars-compiler/ast.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler');
test('htmlbars-compiler/ast.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/ast.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler');
test('htmlbars-tests/htmlbars-compiler/ast.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/ast.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler');
test('htmlbars-compiler/compiler.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler');
test('htmlbars-tests/htmlbars-compiler/compiler.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/fragment.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/fragment.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/fragment.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/fragment.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/fragment.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/fragment.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/fragment_opcode.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/fragment_opcode.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/fragment_opcode.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/fragment_opcode.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/fragment_opcode.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/fragment_opcode.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/helpers.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/helpers.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/helpers.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/helpers.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/helpers.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/helpers.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/hydration.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/hydration.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/hydration.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/hydration.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/hydration.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/hydration.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/hydration_opcode.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/hydration_opcode.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/hydration_opcode.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/hydration_opcode.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/hydration_opcode.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/hydration_opcode.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/quoting.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/quoting.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/quoting.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/quoting.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/quoting.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/quoting.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/template.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/template.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/template.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/template.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/template.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/template.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/template_visitor.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/template_visitor.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/template_visitor.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/template_visitor.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/template_visitor.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/template_visitor.js should pass jshint.');
});
});
define("htmlbars-compiler/compiler/utils.jshint",
define("htmlbars-tests/htmlbars-compiler/compiler/utils.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/compiler');
test('htmlbars-compiler/compiler/utils.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/compiler/utils.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/compiler');
test('htmlbars-tests/htmlbars-compiler/compiler/utils.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/compiler/utils.js should pass jshint.');
});
});
define("htmlbars-compiler/html-parser/helpers.jshint",
define("htmlbars-tests/htmlbars-compiler/html-parser/helpers.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/html-parser');
test('htmlbars-compiler/html-parser/helpers.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/html-parser/helpers.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/html-parser');
test('htmlbars-tests/htmlbars-compiler/html-parser/helpers.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/html-parser/helpers.js should pass jshint.');
});
});
define("htmlbars-compiler/html-parser/node-handlers.jshint",
define("htmlbars-tests/htmlbars-compiler/html-parser/node-handlers.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/html-parser');
test('htmlbars-compiler/html-parser/node-handlers.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/html-parser/node-handlers.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/html-parser');
test('htmlbars-tests/htmlbars-compiler/html-parser/node-handlers.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/html-parser/node-handlers.js should pass jshint.');
});
});
define("htmlbars-compiler/html-parser/token-handlers.jshint",
define("htmlbars-tests/htmlbars-compiler/html-parser/token-handlers.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/html-parser');
test('htmlbars-compiler/html-parser/token-handlers.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/html-parser/token-handlers.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/html-parser');
test('htmlbars-tests/htmlbars-compiler/html-parser/token-handlers.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/html-parser/token-handlers.js should pass jshint.');
});
});
define("htmlbars-compiler/html-parser/tokens.jshint",
define("htmlbars-tests/htmlbars-compiler/html-parser/tokens.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler/html-parser');
test('htmlbars-compiler/html-parser/tokens.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/html-parser/tokens.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler/html-parser');
test('htmlbars-tests/htmlbars-compiler/html-parser/tokens.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/html-parser/tokens.js should pass jshint.');
});
});
define("htmlbars-compiler/parser.jshint",
define("htmlbars-tests/htmlbars-compiler/parser.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler');
test('htmlbars-compiler/parser.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/parser.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler');
test('htmlbars-tests/htmlbars-compiler/parser.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/parser.js should pass jshint.');
});
});
define("htmlbars-compiler/utils.jshint",
define("htmlbars-tests/htmlbars-compiler/utils.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-compiler');
test('htmlbars-compiler/utils.js should pass jshint', function() {
ok(true, 'htmlbars-compiler/utils.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-compiler');
test('htmlbars-tests/htmlbars-compiler/utils.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-compiler/utils.js should pass jshint.');
});
});
define("htmlbars-runtime/hooks.jshint",
define("htmlbars-tests/htmlbars-runtime.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime');
test('htmlbars-runtime/hooks.js should pass jshint', function() {
ok(true, 'htmlbars-runtime/hooks.js should pass jshint.');
module('JSHint - htmlbars-tests');
test('htmlbars-tests/htmlbars-runtime.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-runtime.js should pass jshint.');
});
});
define("htmlbars-runtime/utils.jshint",
define("htmlbars-tests/htmlbars-runtime/hooks.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-runtime');
test('htmlbars-runtime/utils.js should pass jshint', function() {
ok(true, 'htmlbars-runtime/utils.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-runtime');
test('htmlbars-tests/htmlbars-runtime/hooks.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-runtime/hooks.js should pass jshint.');
});
});
define("htmlbars-tests/htmlbars-runtime/utils.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-tests/htmlbars-runtime');
test('htmlbars-tests/htmlbars-runtime/utils.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-runtime/utils.js should pass jshint.');
});
});
define("htmlbars-tests/htmlbars-test",

@@ -202,28 +211,28 @@ ["../htmlbars"],

});
define("htmlbars-util.jshint",
define("htmlbars-tests/htmlbars-util.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-util.js should pass jshint', function() {
ok(true, 'htmlbars-util.js should pass jshint.');
module('JSHint - htmlbars-tests');
test('htmlbars-tests/htmlbars-util.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-util.js should pass jshint.');
});
});
define("htmlbars-util/safe-string.jshint",
define("htmlbars-tests/htmlbars-util/safe-string.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-util');
test('htmlbars-util/safe-string.js should pass jshint', function() {
ok(true, 'htmlbars-util/safe-string.js should pass jshint.');
module('JSHint - htmlbars-tests/htmlbars-util');
test('htmlbars-tests/htmlbars-util/safe-string.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars-util/safe-string.js should pass jshint.');
});
});
define("htmlbars.jshint",
define("htmlbars-tests/htmlbars.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars.js should pass jshint', function() {
ok(true, 'htmlbars.js should pass jshint.');
module('JSHint - htmlbars-tests');
test('htmlbars-tests/htmlbars.js should pass jshint', function() {
ok(true, 'htmlbars-tests/htmlbars.js should pass jshint.');
});
});

@@ -22,19 +22,19 @@ define("htmlbars-util-tests/htmlbars-util-test",

});
define("htmlbars-util.jshint",
define("htmlbars-util-tests/htmlbars-util.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-util.js should pass jshint', function() {
ok(true, 'htmlbars-util.js should pass jshint.');
module('JSHint - htmlbars-util-tests');
test('htmlbars-util-tests/htmlbars-util.js should pass jshint', function() {
ok(true, 'htmlbars-util-tests/htmlbars-util.js should pass jshint.');
});
});
define("htmlbars-util/safe-string.jshint",
define("htmlbars-util-tests/htmlbars-util/safe-string.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-util');
test('htmlbars-util/safe-string.js should pass jshint', function() {
ok(true, 'htmlbars-util/safe-string.js should pass jshint.');
module('JSHint - htmlbars-util-tests/htmlbars-util');
test('htmlbars-util-tests/htmlbars-util/safe-string.js should pass jshint', function() {
ok(true, 'htmlbars-util-tests/htmlbars-util/safe-string.js should pass jshint.');
});
});

@@ -57,2 +57,11 @@ define("htmlbars-test-helpers",

});
define("htmlbars-test-helpers.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-test-helpers.js should pass jshint', function() {
ok(true, 'htmlbars-test-helpers.js should pass jshint.');
});
});
define("htmlbars-util",

@@ -66,2 +75,11 @@ ["./htmlbars-util/safe-string","exports"],

});
define("htmlbars-util.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('htmlbars-util.js should pass jshint', function() {
ok(true, 'htmlbars-util.js should pass jshint.');
});
});
define("htmlbars-util/safe-string",

@@ -81,2 +99,11 @@ ["exports"],

});
define("htmlbars-util/safe-string.jshint",
[],
function() {
"use strict";
module('JSHint - htmlbars-util');
test('htmlbars-util/safe-string.js should pass jshint', function() {
ok(true, 'htmlbars-util/safe-string.js should pass jshint.');
});
});
define("morph-tests/dom-helper-test",

@@ -885,37 +912,37 @@ ["../morph","../htmlbars-test-helpers"],

});
define("morph.jshint",
define("morph-tests/morph.jshint",
[],
function() {
"use strict";
module('JSHint - .');
test('morph.js should pass jshint', function() {
ok(true, 'morph.js should pass jshint.');
module('JSHint - morph-tests');
test('morph-tests/morph.js should pass jshint', function() {
ok(true, 'morph-tests/morph.js should pass jshint.');
});
});
define("morph/dom-helper.jshint",
define("morph-tests/morph/dom-helper.jshint",
[],
function() {
"use strict";
module('JSHint - morph');
test('morph/dom-helper.js should pass jshint', function() {
ok(true, 'morph/dom-helper.js should pass jshint.');
module('JSHint - morph-tests/morph');
test('morph-tests/morph/dom-helper.js should pass jshint', function() {
ok(true, 'morph-tests/morph/dom-helper.js should pass jshint.');
});
});
define("morph/dom-helper/build-html-dom.jshint",
define("morph-tests/morph/dom-helper/build-html-dom.jshint",
[],
function() {
"use strict";
module('JSHint - morph/dom-helper');
test('morph/dom-helper/build-html-dom.js should pass jshint', function() {
ok(true, 'morph/dom-helper/build-html-dom.js should pass jshint.');
module('JSHint - morph-tests/morph/dom-helper');
test('morph-tests/morph/dom-helper/build-html-dom.js should pass jshint', function() {
ok(true, 'morph-tests/morph/dom-helper/build-html-dom.js should pass jshint.');
});
});
define("morph/morph.jshint",
define("morph-tests/morph/morph.jshint",
[],
function() {
"use strict";
module('JSHint - morph');
test('morph/morph.js should pass jshint', function() {
ok(true, 'morph/morph.js should pass jshint.');
module('JSHint - morph-tests/morph');
test('morph-tests/morph/morph.js should pass jshint', function() {
ok(true, 'morph-tests/morph/morph.js should pass jshint.');
});
});
var packagesConfig = {
"version": "0.1.3",
"revision": "76c3b3ca9a9f824339b79384119cc84a0dc0f2b7",
"version": "0.1.5",
"revision": "5551175b0632a14b0cf953009b0324b510d3b1ea",
"vendored": {},

@@ -5,0 +5,0 @@ "dependencies": {

{
"name": "htmlbars",
"version": "0.1.4",
"version": "0.1.5",
"description": "HTMLBars compiles Handlebars templates into document fragments rather than string buffers",

@@ -42,3 +42,4 @@ "main": "dist/cjs/htmlbars.js",

"copy-dereference": "~1.0.0",
"handlebars": "1.3.0",
"git-repo-version": "0.0.2",
"handlebars": "mmun/handlebars.js#5df374595157d6ca13de9e8ada6a5bb064e9b1ae",
"ncp": "~0.5.1",

@@ -45,0 +46,0 @@ "qunit": "^0.7.2",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc