Lines Matching refs:lineno

119 function TemplateError(message, lineno, colno) {
168 err.lineno = lineno;
177 if (this.lineno && this.colno) {
178 msg += " [Line " + this.lineno + ", Column " + this.colno + "]";
179 } else if (this.lineno) {
180 msg += " [Line " + this.lineno + "]";
709 function ensureDefined(val, lineno, colno) {
711 … throw new lib.TemplateError('attempted to output null or undefined value', lineno + 1, colno + 1);
741 function handleError(error, lineno, colno) {
742 if (error.lineno) {
745 return new lib.TemplateError(error, lineno, colno);
882 _proto.init = function init(lineno, colno) {
888 this.lineno = lineno;
948 _proto2.init = function init(lineno, colno, nodes) {
949 _Node2.prototype.init.call(this, lineno, colno, nodes || []);
1004 _proto3.init = function init(lineno, colno, template, names, withContext) {
1005 _Node3.prototype.init.call(this, lineno, colno, template, names || new NodeList(), withContext);
1262 _proto.fail = function fail(msg, lineno, colno) {
1263 if (lineno !== undefined) {
1264 lineno += 1;
1269 throw new TemplateError(msg, lineno, colno);
1300 this._emitLine("var lineno = " + node.lineno + ";");
1375 this.fail("assertType: invalid type: " + node.typename, node.lineno, node.colno);
1615 this._emit('(lineno = ' + node.lineno + ', colno = ' + node.colno + ', ');
2170 _this15._emit("," + node.lineno + "," + node.colno + ")");
2218 this.fail("compile: Cannot compile node: " + node.typename, node.lineno, node.colno);
2884 _proto.error = function error(msg, lineno, colno) {
2885 if (lineno === undefined || colno === undefined) {
2887 lineno = tok.lineno;
2890 if (lineno !== undefined) {
2891 lineno += 1;
2896 return new lib.TemplateError(msg, lineno, colno);
2898 _proto.fail = function fail(msg, lineno, colno) {
2899 throw this.error(msg, lineno, colno);
2912 this.fail('expected ' + type + ', got ' + tok.type, tok.lineno, tok.colno);
2963 node = new nodes.For(forTok.lineno, forTok.colno);
2966 node = new nodes.AsyncEach(forTok.lineno, forTok.colno);
2969 node = new nodes.AsyncAll(forTok.lineno, forTok.colno);
2972 this.fail('parseFor: expected for{Async}', forTok.lineno, forTok.colno);
2982 node.name = new nodes.Array(key.lineno, key.colno);
2990 this.fail('parseFor: expected "in" keyword for loop', forTok.lineno, forTok.colno);
3009 var node = new nodes.Macro(macroTok.lineno, macroTok.colno, name, args);
3027 var callerName = new nodes.Symbol(callTok.lineno, callTok.colno, 'caller');
3028 var callerNode = new nodes.Caller(callTok.lineno, callTok.colno, callerName, callerArgs, body);
3036 kwargs.addChild(new nodes.Pair(callTok.lineno, callTok.colno, callerName, callerNode));
3037 return new nodes.Output(callTok.lineno, callTok.colno, [macroCall]);
3049 this.fail('parseFrom: expected context after with/without', tok.lineno, tok.colno);
3057 this.fail('parseImport: expected import', importTok.lineno, importTok.colno);
3061 this.fail('parseImport: expected "as" keyword', importTok.lineno, importTok.colno);
3065 var node = new nodes.Import(importTok.lineno, importTok.colno, template, target, withContext);
3076 this.fail('parseFrom: expected import', fromTok.lineno, fromTok.colno);
3085 this.fail('parseFrom: Expected at least one import name', fromTok.lineno, fromTok.colno);
3098 this.fail('parseFrom: expected comma', fromTok.lineno, fromTok.colno);
3102 …this.fail('parseFrom: names starting with an underscore cannot be imported', name.lineno, name.col…
3106 names.addChild(new nodes.Pair(name.lineno, name.colno, name, alias));
3112 return new nodes.FromImport(fromTok.lineno, fromTok.colno, template, names, withContext);
3117 this.fail('parseBlock: expected block', tag.lineno, tag.colno);
3119 var node = new nodes.Block(tag.lineno, tag.colno);
3122 this.fail('parseBlock: variable name expected', tag.lineno, tag.colno);
3141 var node = new nodes.Extends(tag.lineno, tag.colno);
3152 var node = new nodes.Include(tag.lineno, tag.colno);
3164 node = new nodes.If(tag.lineno, tag.colno);
3166 node = new nodes.IfAsync(tag.lineno, tag.colno);
3168 this.fail('parseIf: expected if, elif, or elseif', tag.lineno, tag.colno);
3196 this.fail('parseSet: expected set', tag.lineno, tag.colno);
3198 var node = new nodes.Set(tag.lineno, tag.colno, []);
3208 this.fail('parseSet: expected = or block end in set tag', tag.lineno, tag.colno);
3210 node.body = new nodes.Capture(tag.lineno, tag.colno, this.parseUntilBlocks('endset'));
3235 this.fail('parseSwitch: expected "switch," "case" or "default"', tag.lineno, tag.colno);
3281 return new nodes.Switch(tag.lineno, tag.colno, expr, cases, defaultCase);
3287 this.fail('tag name expected', tok.lineno, tok.colno);
3333 this.fail('unknown block tag: ' + tok.value, tok.lineno, tok.colno);
3374 …return new nodes.Output(begun.lineno, begun.colno, [new nodes.TemplateData(begun.lineno, begun.col…
3382 node = new nodes.FunCall(tok.lineno, tok.colno, node, this.parseSignature());
3389 node = new nodes.LookupVal(tok.lineno, tok.colno, node, lookup.children[0]);
3395 this.fail('expected name as lookup value, got ' + val.value, val.lineno, val.colno);
3400 lookup = new nodes.Literal(val.lineno, val.colno, val.value);
3401 node = new nodes.LookupVal(tok.lineno, tok.colno, node, lookup);
3418 node = new nodes.InlineIf(node.lineno, node.colno);
3433 node = new nodes.Or(node.lineno, node.colno, node, node2);
3441 node = new nodes.And(node.lineno, node.colno, node, node2);
3448 return new nodes.Not(tok.lineno, tok.colno, this.parseNot());
3468 node = new nodes.In(node.lineno, node.colno, node, node2);
3470 node = new nodes.Not(node.lineno, node.colno, node);
3495 node = new nodes.Is(node.lineno, node.colno, node, node2);
3498 node = new nodes.Not(node.lineno, node.colno, node);
3514 ops.push(new nodes.CompareOperand(tok.lineno, tok.colno, this.parseConcat(), tok.value));
3521 return new nodes.Compare(ops[0].lineno, ops[0].colno, expr, ops);
3533 node = new nodes.Concat(node.lineno, node.colno, node, node2);
3541 node = new nodes.Add(node.lineno, node.colno, node, node2);
3549 node = new nodes.Sub(node.lineno, node.colno, node, node2);
3557 node = new nodes.Mul(node.lineno, node.colno, node, node2);
3565 node = new nodes.Div(node.lineno, node.colno, node, node2);
3573 node = new nodes.FloorDiv(node.lineno, node.colno, node, node2);
3581 node = new nodes.Mod(node.lineno, node.colno, node, node2);
3589 node = new nodes.Pow(node.lineno, node.colno, node, node2);
3597 node = new nodes.Neg(tok.lineno, tok.colno, this.parseUnary(true));
3599 node = new nodes.Pos(tok.lineno, tok.colno, this.parseUnary(true));
3626 this.fail('invalid boolean: ' + tok.value, tok.lineno, tok.colno);
3634 node = new nodes.Literal(tok.lineno, tok.colno, val);
3636 node = new nodes.Symbol(tok.lineno, tok.colno, tok.value);
3649 throw this.error("unexpected token: " + tok.value, tok.lineno, tok.colno);
3658 return new nodes.Symbol(tok.lineno, tok.colno, name);
3672 …node = new nodes.Filter(name.lineno, name.colno, name, new nodes.NodeList(name.lineno, name.colno,…
3684 var body = new nodes.Capture(name.lineno, name.colno, this.parseUntilBlocks('endfilter'));
3686 …var node = new nodes.Filter(name.lineno, name.colno, name, new nodes.NodeList(name.lineno, name.co…
3687 return new nodes.Output(name.lineno, name.colno, [node]);
3694 node = new nodes.Group(tok.lineno, tok.colno);
3697 node = new nodes.Array(tok.lineno, tok.colno);
3700 node = new nodes.Dict(tok.lineno, tok.colno);
3714 this.fail('parseAggregate: expected comma after expression', tok.lineno, tok.colno);
3724 this.fail('parseAggregate: expected colon after dict key', tok.lineno, tok.colno);
3729 node.addChild(new nodes.Pair(key.lineno, key.colno, key, value));
3744 this.fail('expected arguments', tok.lineno, tok.colno);
3750 var args = new nodes.NodeList(tok.lineno, tok.colno);
3751 var kwargs = new nodes.KeywordArgs(tok.lineno, tok.colno);
3763 this.fail('parseSignature: expected comma after expression', tok.lineno, tok.colno);
3767 kwargs.addChild(new nodes.Pair(arg.lineno, arg.colno, arg, this.parseExpression()));
3812 …buf.push(new nodes.Output(tok.lineno, tok.colno, [new nodes.TemplateData(tok.lineno, tok.colno, da…
3824 buf.push(new nodes.Output(tok.lineno, tok.colno, [e]));
3829 this.fail('Unexpected token at top-level: ' + tok.type, tok.lineno, tok.colno);
3906 function token(type, value, lineno, colno) {
3910 lineno: lineno,
3919 this.lineno = 0;
3937 var lineno = this.lineno;
3948 return token(TOKEN_STRING, this._parseString(cur), lineno, colno);
3951 return token(TOKEN_WHITESPACE, tok, lineno, colno);
3977 return token(TOKEN_BLOCK_END, tok, lineno, colno);
3981 return token(TOKEN_VARIABLE_END, tok, lineno, colno);
4014 }, lineno, colno);
4065 return token(type, cur, lineno, colno);
4074 return token(TOKEN_FLOAT, tok + '.' + dec, lineno, colno);
4076 return token(TOKEN_INT, tok, lineno, colno);
4079 return token(TOKEN_BOOLEAN, tok, lineno, colno);
4081 return token(TOKEN_NONE, tok, lineno, colno);
4090 return token(TOKEN_NONE, tok, lineno, colno);
4092 return token(TOKEN_SYMBOL, tok, lineno, colno);
4106 return token(TOKEN_BLOCK_START, tok, lineno, colno);
4109 return token(TOKEN_VARIABLE_START, tok, lineno, colno);
4158 return token(inComment ? TOKEN_COMMENT : TOKEN_DATA, tok, lineno, colno);
4263 this.lineno++;
4277 this.lineno--;
5499 ast = new nodes[ast.typename](ast.lineno, ast.colno, children);
5517 ast = new nodes[ast.typename](ast.lineno, ast.colno);
5535 symbol = new nodes.Symbol(descNode.lineno, descNode.colno, gensym());
5536 …children.push(new nodes.FilterAsync(descNode.lineno, descNode.colno, descNode.name, descNode.args,…
5547 return new nodes.NodeList(node.lineno, node.colno, children);
5580 return new nodes.Symbol(node.lineno, node.colno, symbol);
5604 return new nodes.IfAsync(node.lineno, node.colno, node.cond, node.body, node.else_);
5606 … return new nodes.AsyncEach(node.lineno, node.colno, node.arr, node.name, node.body, node.else_);
6844 this.fail('parseSlice: too many slice components', tok.lineno, tok.colno);
6860 return new nodes.Array(tok.lineno, tok.colno, [node]);