lib/tree.js
File tree.js
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* A tree representation of the template tokens.
*
* @module tree
*/
Function constructConditional
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructConditional = function(root, kind) {
root.type = root.type || "ConditionalExpression";
root.conditions = root.conditions || [];
var prev = {};
Function constructEach
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructEach = function(root) {
root.type = "LoopExpression";
root.conditions = [];
// Find the left side identifier.
Function make
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.make = function(root, END) {
root = root || this.root;
var node, result, prev, next;
var index = 0;
Function constructProperty
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructProperty = function(encoded) {
var propertyDescriptor = {
type: encoded ? "Property" : "RawProperty",
value: "",
args: [],
Function constructFilter
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructFilter = function(root) {
var current = {
type: "Filter",
args: []
};
Function constructExtend
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructExtend = function(root) {
root.type = "ExtendExpression";
// What to return to the compiler.
var value = {
Function constructExpression
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructExpression = function(root, END) {
var expressionRoot = {
nodes: []
};
Function constructPartial
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tree.prototype.constructPartial = function(root) {
root.type = "PartialExpression";
// By default isolate the partial from the parent's data.
root.value = "";