Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/handleba...
File: handlebars.js
[3000] Fix | Delete
if (!this.mutating || ret) {
[3001] Fix | Delete
return ret;
[3002] Fix | Delete
} else if (ret !== false) {
[3003] Fix | Delete
return object;
[3004] Fix | Delete
}
[3005] Fix | Delete
},
[3006] Fix | Delete
[3007] Fix | Delete
Program: function Program(program) {
[3008] Fix | Delete
this.acceptArray(program.body);
[3009] Fix | Delete
},
[3010] Fix | Delete
[3011] Fix | Delete
MustacheStatement: visitSubExpression,
[3012] Fix | Delete
Decorator: visitSubExpression,
[3013] Fix | Delete
[3014] Fix | Delete
BlockStatement: visitBlock,
[3015] Fix | Delete
DecoratorBlock: visitBlock,
[3016] Fix | Delete
[3017] Fix | Delete
PartialStatement: visitPartial,
[3018] Fix | Delete
PartialBlockStatement: function PartialBlockStatement(partial) {
[3019] Fix | Delete
visitPartial.call(this, partial);
[3020] Fix | Delete
[3021] Fix | Delete
this.acceptKey(partial, 'program');
[3022] Fix | Delete
},
[3023] Fix | Delete
[3024] Fix | Delete
ContentStatement: function ContentStatement() /* content */{},
[3025] Fix | Delete
CommentStatement: function CommentStatement() /* comment */{},
[3026] Fix | Delete
[3027] Fix | Delete
SubExpression: visitSubExpression,
[3028] Fix | Delete
[3029] Fix | Delete
PathExpression: function PathExpression() /* path */{},
[3030] Fix | Delete
[3031] Fix | Delete
StringLiteral: function StringLiteral() /* string */{},
[3032] Fix | Delete
NumberLiteral: function NumberLiteral() /* number */{},
[3033] Fix | Delete
BooleanLiteral: function BooleanLiteral() /* bool */{},
[3034] Fix | Delete
UndefinedLiteral: function UndefinedLiteral() /* literal */{},
[3035] Fix | Delete
NullLiteral: function NullLiteral() /* literal */{},
[3036] Fix | Delete
[3037] Fix | Delete
Hash: function Hash(hash) {
[3038] Fix | Delete
this.acceptArray(hash.pairs);
[3039] Fix | Delete
},
[3040] Fix | Delete
HashPair: function HashPair(pair) {
[3041] Fix | Delete
this.acceptRequired(pair, 'value');
[3042] Fix | Delete
}
[3043] Fix | Delete
};
[3044] Fix | Delete
[3045] Fix | Delete
function visitSubExpression(mustache) {
[3046] Fix | Delete
this.acceptRequired(mustache, 'path');
[3047] Fix | Delete
this.acceptArray(mustache.params);
[3048] Fix | Delete
this.acceptKey(mustache, 'hash');
[3049] Fix | Delete
}
[3050] Fix | Delete
function visitBlock(block) {
[3051] Fix | Delete
visitSubExpression.call(this, block);
[3052] Fix | Delete
[3053] Fix | Delete
this.acceptKey(block, 'program');
[3054] Fix | Delete
this.acceptKey(block, 'inverse');
[3055] Fix | Delete
}
[3056] Fix | Delete
function visitPartial(partial) {
[3057] Fix | Delete
this.acceptRequired(partial, 'name');
[3058] Fix | Delete
this.acceptArray(partial.params);
[3059] Fix | Delete
this.acceptKey(partial, 'hash');
[3060] Fix | Delete
}
[3061] Fix | Delete
[3062] Fix | Delete
exports['default'] = Visitor;
[3063] Fix | Delete
module.exports = exports['default'];
[3064] Fix | Delete
[3065] Fix | Delete
/***/ }),
[3066] Fix | Delete
/* 50 */
[3067] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[3068] Fix | Delete
[3069] Fix | Delete
'use strict';
[3070] Fix | Delete
[3071] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[3072] Fix | Delete
[3073] Fix | Delete
exports.__esModule = true;
[3074] Fix | Delete
exports.SourceLocation = SourceLocation;
[3075] Fix | Delete
exports.id = id;
[3076] Fix | Delete
exports.stripFlags = stripFlags;
[3077] Fix | Delete
exports.stripComment = stripComment;
[3078] Fix | Delete
exports.preparePath = preparePath;
[3079] Fix | Delete
exports.prepareMustache = prepareMustache;
[3080] Fix | Delete
exports.prepareRawBlock = prepareRawBlock;
[3081] Fix | Delete
exports.prepareBlock = prepareBlock;
[3082] Fix | Delete
exports.prepareProgram = prepareProgram;
[3083] Fix | Delete
exports.preparePartialBlock = preparePartialBlock;
[3084] Fix | Delete
[3085] Fix | Delete
var _exception = __webpack_require__(6);
[3086] Fix | Delete
[3087] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[3088] Fix | Delete
[3089] Fix | Delete
function validateClose(open, close) {
[3090] Fix | Delete
close = close.path ? close.path.original : close;
[3091] Fix | Delete
[3092] Fix | Delete
if (open.path.original !== close) {
[3093] Fix | Delete
var errorNode = { loc: open.path.loc };
[3094] Fix | Delete
[3095] Fix | Delete
throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
[3096] Fix | Delete
}
[3097] Fix | Delete
}
[3098] Fix | Delete
[3099] Fix | Delete
function SourceLocation(source, locInfo) {
[3100] Fix | Delete
this.source = source;
[3101] Fix | Delete
this.start = {
[3102] Fix | Delete
line: locInfo.first_line,
[3103] Fix | Delete
column: locInfo.first_column
[3104] Fix | Delete
};
[3105] Fix | Delete
this.end = {
[3106] Fix | Delete
line: locInfo.last_line,
[3107] Fix | Delete
column: locInfo.last_column
[3108] Fix | Delete
};
[3109] Fix | Delete
}
[3110] Fix | Delete
[3111] Fix | Delete
function id(token) {
[3112] Fix | Delete
if (/^\[.*\]$/.test(token)) {
[3113] Fix | Delete
return token.substring(1, token.length - 1);
[3114] Fix | Delete
} else {
[3115] Fix | Delete
return token;
[3116] Fix | Delete
}
[3117] Fix | Delete
}
[3118] Fix | Delete
[3119] Fix | Delete
function stripFlags(open, close) {
[3120] Fix | Delete
return {
[3121] Fix | Delete
open: open.charAt(2) === '~',
[3122] Fix | Delete
close: close.charAt(close.length - 3) === '~'
[3123] Fix | Delete
};
[3124] Fix | Delete
}
[3125] Fix | Delete
[3126] Fix | Delete
function stripComment(comment) {
[3127] Fix | Delete
return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
[3128] Fix | Delete
}
[3129] Fix | Delete
[3130] Fix | Delete
function preparePath(data, parts, loc) {
[3131] Fix | Delete
loc = this.locInfo(loc);
[3132] Fix | Delete
[3133] Fix | Delete
var original = data ? '@' : '',
[3134] Fix | Delete
dig = [],
[3135] Fix | Delete
depth = 0;
[3136] Fix | Delete
[3137] Fix | Delete
for (var i = 0, l = parts.length; i < l; i++) {
[3138] Fix | Delete
var part = parts[i].part,
[3139] Fix | Delete
[3140] Fix | Delete
// If we have [] syntax then we do not treat path references as operators,
[3141] Fix | Delete
// i.e. foo.[this] resolves to approximately context.foo['this']
[3142] Fix | Delete
isLiteral = parts[i].original !== part;
[3143] Fix | Delete
original += (parts[i].separator || '') + part;
[3144] Fix | Delete
[3145] Fix | Delete
if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
[3146] Fix | Delete
if (dig.length > 0) {
[3147] Fix | Delete
throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
[3148] Fix | Delete
} else if (part === '..') {
[3149] Fix | Delete
depth++;
[3150] Fix | Delete
}
[3151] Fix | Delete
} else {
[3152] Fix | Delete
dig.push(part);
[3153] Fix | Delete
}
[3154] Fix | Delete
}
[3155] Fix | Delete
[3156] Fix | Delete
return {
[3157] Fix | Delete
type: 'PathExpression',
[3158] Fix | Delete
data: data,
[3159] Fix | Delete
depth: depth,
[3160] Fix | Delete
parts: dig,
[3161] Fix | Delete
original: original,
[3162] Fix | Delete
loc: loc
[3163] Fix | Delete
};
[3164] Fix | Delete
}
[3165] Fix | Delete
[3166] Fix | Delete
function prepareMustache(path, params, hash, open, strip, locInfo) {
[3167] Fix | Delete
// Must use charAt to support IE pre-10
[3168] Fix | Delete
var escapeFlag = open.charAt(3) || open.charAt(2),
[3169] Fix | Delete
escaped = escapeFlag !== '{' && escapeFlag !== '&';
[3170] Fix | Delete
[3171] Fix | Delete
var decorator = /\*/.test(open);
[3172] Fix | Delete
return {
[3173] Fix | Delete
type: decorator ? 'Decorator' : 'MustacheStatement',
[3174] Fix | Delete
path: path,
[3175] Fix | Delete
params: params,
[3176] Fix | Delete
hash: hash,
[3177] Fix | Delete
escaped: escaped,
[3178] Fix | Delete
strip: strip,
[3179] Fix | Delete
loc: this.locInfo(locInfo)
[3180] Fix | Delete
};
[3181] Fix | Delete
}
[3182] Fix | Delete
[3183] Fix | Delete
function prepareRawBlock(openRawBlock, contents, close, locInfo) {
[3184] Fix | Delete
validateClose(openRawBlock, close);
[3185] Fix | Delete
[3186] Fix | Delete
locInfo = this.locInfo(locInfo);
[3187] Fix | Delete
var program = {
[3188] Fix | Delete
type: 'Program',
[3189] Fix | Delete
body: contents,
[3190] Fix | Delete
strip: {},
[3191] Fix | Delete
loc: locInfo
[3192] Fix | Delete
};
[3193] Fix | Delete
[3194] Fix | Delete
return {
[3195] Fix | Delete
type: 'BlockStatement',
[3196] Fix | Delete
path: openRawBlock.path,
[3197] Fix | Delete
params: openRawBlock.params,
[3198] Fix | Delete
hash: openRawBlock.hash,
[3199] Fix | Delete
program: program,
[3200] Fix | Delete
openStrip: {},
[3201] Fix | Delete
inverseStrip: {},
[3202] Fix | Delete
closeStrip: {},
[3203] Fix | Delete
loc: locInfo
[3204] Fix | Delete
};
[3205] Fix | Delete
}
[3206] Fix | Delete
[3207] Fix | Delete
function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
[3208] Fix | Delete
if (close && close.path) {
[3209] Fix | Delete
validateClose(openBlock, close);
[3210] Fix | Delete
}
[3211] Fix | Delete
[3212] Fix | Delete
var decorator = /\*/.test(openBlock.open);
[3213] Fix | Delete
[3214] Fix | Delete
program.blockParams = openBlock.blockParams;
[3215] Fix | Delete
[3216] Fix | Delete
var inverse = undefined,
[3217] Fix | Delete
inverseStrip = undefined;
[3218] Fix | Delete
[3219] Fix | Delete
if (inverseAndProgram) {
[3220] Fix | Delete
if (decorator) {
[3221] Fix | Delete
throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
[3222] Fix | Delete
}
[3223] Fix | Delete
[3224] Fix | Delete
if (inverseAndProgram.chain) {
[3225] Fix | Delete
inverseAndProgram.program.body[0].closeStrip = close.strip;
[3226] Fix | Delete
}
[3227] Fix | Delete
[3228] Fix | Delete
inverseStrip = inverseAndProgram.strip;
[3229] Fix | Delete
inverse = inverseAndProgram.program;
[3230] Fix | Delete
}
[3231] Fix | Delete
[3232] Fix | Delete
if (inverted) {
[3233] Fix | Delete
inverted = inverse;
[3234] Fix | Delete
inverse = program;
[3235] Fix | Delete
program = inverted;
[3236] Fix | Delete
}
[3237] Fix | Delete
[3238] Fix | Delete
return {
[3239] Fix | Delete
type: decorator ? 'DecoratorBlock' : 'BlockStatement',
[3240] Fix | Delete
path: openBlock.path,
[3241] Fix | Delete
params: openBlock.params,
[3242] Fix | Delete
hash: openBlock.hash,
[3243] Fix | Delete
program: program,
[3244] Fix | Delete
inverse: inverse,
[3245] Fix | Delete
openStrip: openBlock.strip,
[3246] Fix | Delete
inverseStrip: inverseStrip,
[3247] Fix | Delete
closeStrip: close && close.strip,
[3248] Fix | Delete
loc: this.locInfo(locInfo)
[3249] Fix | Delete
};
[3250] Fix | Delete
}
[3251] Fix | Delete
[3252] Fix | Delete
function prepareProgram(statements, loc) {
[3253] Fix | Delete
if (!loc && statements.length) {
[3254] Fix | Delete
var firstLoc = statements[0].loc,
[3255] Fix | Delete
lastLoc = statements[statements.length - 1].loc;
[3256] Fix | Delete
[3257] Fix | Delete
/* istanbul ignore else */
[3258] Fix | Delete
if (firstLoc && lastLoc) {
[3259] Fix | Delete
loc = {
[3260] Fix | Delete
source: firstLoc.source,
[3261] Fix | Delete
start: {
[3262] Fix | Delete
line: firstLoc.start.line,
[3263] Fix | Delete
column: firstLoc.start.column
[3264] Fix | Delete
},
[3265] Fix | Delete
end: {
[3266] Fix | Delete
line: lastLoc.end.line,
[3267] Fix | Delete
column: lastLoc.end.column
[3268] Fix | Delete
}
[3269] Fix | Delete
};
[3270] Fix | Delete
}
[3271] Fix | Delete
}
[3272] Fix | Delete
[3273] Fix | Delete
return {
[3274] Fix | Delete
type: 'Program',
[3275] Fix | Delete
body: statements,
[3276] Fix | Delete
strip: {},
[3277] Fix | Delete
loc: loc
[3278] Fix | Delete
};
[3279] Fix | Delete
}
[3280] Fix | Delete
[3281] Fix | Delete
function preparePartialBlock(open, program, close, locInfo) {
[3282] Fix | Delete
validateClose(open, close);
[3283] Fix | Delete
[3284] Fix | Delete
return {
[3285] Fix | Delete
type: 'PartialBlockStatement',
[3286] Fix | Delete
name: open.path,
[3287] Fix | Delete
params: open.params,
[3288] Fix | Delete
hash: open.hash,
[3289] Fix | Delete
program: program,
[3290] Fix | Delete
openStrip: open.strip,
[3291] Fix | Delete
closeStrip: close && close.strip,
[3292] Fix | Delete
loc: this.locInfo(locInfo)
[3293] Fix | Delete
};
[3294] Fix | Delete
}
[3295] Fix | Delete
[3296] Fix | Delete
/***/ }),
[3297] Fix | Delete
/* 51 */
[3298] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[3299] Fix | Delete
[3300] Fix | Delete
/* eslint-disable new-cap */
[3301] Fix | Delete
[3302] Fix | Delete
'use strict';
[3303] Fix | Delete
[3304] Fix | Delete
var _Object$create = __webpack_require__(34)['default'];
[3305] Fix | Delete
[3306] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[3307] Fix | Delete
[3308] Fix | Delete
exports.__esModule = true;
[3309] Fix | Delete
exports.Compiler = Compiler;
[3310] Fix | Delete
exports.precompile = precompile;
[3311] Fix | Delete
exports.compile = compile;
[3312] Fix | Delete
[3313] Fix | Delete
var _exception = __webpack_require__(6);
[3314] Fix | Delete
[3315] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[3316] Fix | Delete
[3317] Fix | Delete
var _utils = __webpack_require__(5);
[3318] Fix | Delete
[3319] Fix | Delete
var _ast = __webpack_require__(45);
[3320] Fix | Delete
[3321] Fix | Delete
var _ast2 = _interopRequireDefault(_ast);
[3322] Fix | Delete
[3323] Fix | Delete
var slice = [].slice;
[3324] Fix | Delete
[3325] Fix | Delete
function Compiler() {}
[3326] Fix | Delete
[3327] Fix | Delete
// the foundHelper register will disambiguate helper lookup from finding a
[3328] Fix | Delete
// function in a context. This is necessary for mustache compatibility, which
[3329] Fix | Delete
// requires that context functions in blocks are evaluated by blockHelperMissing,
[3330] Fix | Delete
// and then proceed as if the resulting value was provided to blockHelperMissing.
[3331] Fix | Delete
[3332] Fix | Delete
Compiler.prototype = {
[3333] Fix | Delete
compiler: Compiler,
[3334] Fix | Delete
[3335] Fix | Delete
equals: function equals(other) {
[3336] Fix | Delete
var len = this.opcodes.length;
[3337] Fix | Delete
if (other.opcodes.length !== len) {
[3338] Fix | Delete
return false;
[3339] Fix | Delete
}
[3340] Fix | Delete
[3341] Fix | Delete
for (var i = 0; i < len; i++) {
[3342] Fix | Delete
var opcode = this.opcodes[i],
[3343] Fix | Delete
otherOpcode = other.opcodes[i];
[3344] Fix | Delete
if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
[3345] Fix | Delete
return false;
[3346] Fix | Delete
}
[3347] Fix | Delete
}
[3348] Fix | Delete
[3349] Fix | Delete
// We know that length is the same between the two arrays because they are directly tied
[3350] Fix | Delete
// to the opcode behavior above.
[3351] Fix | Delete
len = this.children.length;
[3352] Fix | Delete
for (var i = 0; i < len; i++) {
[3353] Fix | Delete
if (!this.children[i].equals(other.children[i])) {
[3354] Fix | Delete
return false;
[3355] Fix | Delete
}
[3356] Fix | Delete
}
[3357] Fix | Delete
[3358] Fix | Delete
return true;
[3359] Fix | Delete
},
[3360] Fix | Delete
[3361] Fix | Delete
guid: 0,
[3362] Fix | Delete
[3363] Fix | Delete
compile: function compile(program, options) {
[3364] Fix | Delete
this.sourceNode = [];
[3365] Fix | Delete
this.opcodes = [];
[3366] Fix | Delete
this.children = [];
[3367] Fix | Delete
this.options = options;
[3368] Fix | Delete
this.stringParams = options.stringParams;
[3369] Fix | Delete
this.trackIds = options.trackIds;
[3370] Fix | Delete
[3371] Fix | Delete
options.blockParams = options.blockParams || [];
[3372] Fix | Delete
[3373] Fix | Delete
options.knownHelpers = _utils.extend(_Object$create(null), {
[3374] Fix | Delete
helperMissing: true,
[3375] Fix | Delete
blockHelperMissing: true,
[3376] Fix | Delete
each: true,
[3377] Fix | Delete
'if': true,
[3378] Fix | Delete
unless: true,
[3379] Fix | Delete
'with': true,
[3380] Fix | Delete
log: true,
[3381] Fix | Delete
lookup: true
[3382] Fix | Delete
}, options.knownHelpers);
[3383] Fix | Delete
[3384] Fix | Delete
return this.accept(program);
[3385] Fix | Delete
},
[3386] Fix | Delete
[3387] Fix | Delete
compileProgram: function compileProgram(program) {
[3388] Fix | Delete
var childCompiler = new this.compiler(),
[3389] Fix | Delete
// eslint-disable-line new-cap
[3390] Fix | Delete
result = childCompiler.compile(program, this.options),
[3391] Fix | Delete
guid = this.guid++;
[3392] Fix | Delete
[3393] Fix | Delete
this.usePartial = this.usePartial || result.usePartial;
[3394] Fix | Delete
[3395] Fix | Delete
this.children[guid] = result;
[3396] Fix | Delete
this.useDepths = this.useDepths || result.useDepths;
[3397] Fix | Delete
[3398] Fix | Delete
return guid;
[3399] Fix | Delete
},
[3400] Fix | Delete
[3401] Fix | Delete
accept: function accept(node) {
[3402] Fix | Delete
/* istanbul ignore next: Sanity code */
[3403] Fix | Delete
if (!this[node.type]) {
[3404] Fix | Delete
throw new _exception2['default']('Unknown type: ' + node.type, node);
[3405] Fix | Delete
}
[3406] Fix | Delete
[3407] Fix | Delete
this.sourceNode.unshift(node);
[3408] Fix | Delete
var ret = this[node.type](node);
[3409] Fix | Delete
this.sourceNode.shift();
[3410] Fix | Delete
return ret;
[3411] Fix | Delete
},
[3412] Fix | Delete
[3413] Fix | Delete
Program: function Program(program) {
[3414] Fix | Delete
this.options.blockParams.unshift(program.blockParams);
[3415] Fix | Delete
[3416] Fix | Delete
var body = program.body,
[3417] Fix | Delete
bodyLength = body.length;
[3418] Fix | Delete
for (var i = 0; i < bodyLength; i++) {
[3419] Fix | Delete
this.accept(body[i]);
[3420] Fix | Delete
}
[3421] Fix | Delete
[3422] Fix | Delete
this.options.blockParams.shift();
[3423] Fix | Delete
[3424] Fix | Delete
this.isSimple = bodyLength === 1;
[3425] Fix | Delete
this.blockParams = program.blockParams ? program.blockParams.length : 0;
[3426] Fix | Delete
[3427] Fix | Delete
return this;
[3428] Fix | Delete
},
[3429] Fix | Delete
[3430] Fix | Delete
BlockStatement: function BlockStatement(block) {
[3431] Fix | Delete
transformLiteralToPath(block);
[3432] Fix | Delete
[3433] Fix | Delete
var program = block.program,
[3434] Fix | Delete
inverse = block.inverse;
[3435] Fix | Delete
[3436] Fix | Delete
program = program && this.compileProgram(program);
[3437] Fix | Delete
inverse = inverse && this.compileProgram(inverse);
[3438] Fix | Delete
[3439] Fix | Delete
var type = this.classifySexpr(block);
[3440] Fix | Delete
[3441] Fix | Delete
if (type === 'helper') {
[3442] Fix | Delete
this.helperSexpr(block, program, inverse);
[3443] Fix | Delete
} else if (type === 'simple') {
[3444] Fix | Delete
this.simpleSexpr(block);
[3445] Fix | Delete
[3446] Fix | Delete
// now that the simple mustache is resolved, we need to
[3447] Fix | Delete
// evaluate it by executing `blockHelperMissing`
[3448] Fix | Delete
this.opcode('pushProgram', program);
[3449] Fix | Delete
this.opcode('pushProgram', inverse);
[3450] Fix | Delete
this.opcode('emptyHash');
[3451] Fix | Delete
this.opcode('blockValue', block.path.original);
[3452] Fix | Delete
} else {
[3453] Fix | Delete
this.ambiguousSexpr(block, program, inverse);
[3454] Fix | Delete
[3455] Fix | Delete
// now that the simple mustache is resolved, we need to
[3456] Fix | Delete
// evaluate it by executing `blockHelperMissing`
[3457] Fix | Delete
this.opcode('pushProgram', program);
[3458] Fix | Delete
this.opcode('pushProgram', inverse);
[3459] Fix | Delete
this.opcode('emptyHash');
[3460] Fix | Delete
this.opcode('ambiguousBlockValue');
[3461] Fix | Delete
}
[3462] Fix | Delete
[3463] Fix | Delete
this.opcode('append');
[3464] Fix | Delete
},
[3465] Fix | Delete
[3466] Fix | Delete
DecoratorBlock: function DecoratorBlock(decorator) {
[3467] Fix | Delete
var program = decorator.program && this.compileProgram(decorator.program);
[3468] Fix | Delete
var params = this.setupFullMustacheParams(decorator, program, undefined),
[3469] Fix | Delete
path = decorator.path;
[3470] Fix | Delete
[3471] Fix | Delete
this.useDecorators = true;
[3472] Fix | Delete
this.opcode('registerDecorator', params.length, path.original);
[3473] Fix | Delete
},
[3474] Fix | Delete
[3475] Fix | Delete
PartialStatement: function PartialStatement(partial) {
[3476] Fix | Delete
this.usePartial = true;
[3477] Fix | Delete
[3478] Fix | Delete
var program = partial.program;
[3479] Fix | Delete
if (program) {
[3480] Fix | Delete
program = this.compileProgram(partial.program);
[3481] Fix | Delete
}
[3482] Fix | Delete
[3483] Fix | Delete
var params = partial.params;
[3484] Fix | Delete
if (params.length > 1) {
[3485] Fix | Delete
throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
[3486] Fix | Delete
} else if (!params.length) {
[3487] Fix | Delete
if (this.options.explicitPartialContext) {
[3488] Fix | Delete
this.opcode('pushLiteral', 'undefined');
[3489] Fix | Delete
} else {
[3490] Fix | Delete
params.push({ type: 'PathExpression', parts: [], depth: 0 });
[3491] Fix | Delete
}
[3492] Fix | Delete
}
[3493] Fix | Delete
[3494] Fix | Delete
var partialName = partial.name.original,
[3495] Fix | Delete
isDynamic = partial.name.type === 'SubExpression';
[3496] Fix | Delete
if (isDynamic) {
[3497] Fix | Delete
this.accept(partial.name);
[3498] Fix | Delete
}
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function