Lines Matching +full:fail +full:- +full:fast
58 /******/ // getDefaultExport function for compatibility with non-harmony modules
287 var index = -1;
289 if (indexOf(contains, array[index]) === -1) {
335 var i = -1;
350 var i = -1;
368 /* eslint-disable no-restricted-syntax */
400 return val.indexOf(key) !== -1;
525 // Frames keep track of scoping both at compile-time and run-time so
550 for (var i = 0; i < parts.length - 1; i++) {
557 obj[parts[parts.length - 1]] = val;
637 var lastArg = args[len - 1];
649 var lastArg = args[len - 1];
651 return len - 1;
885 …for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len…
886 args[_key - 2] = arguments[_key];
1102 var nl = i === lines.length - 1 ? '' : '\n';
1262 _proto.fail = function fail(msg, lineno, colno) {
1369 …for (var _len2 = arguments.length, types = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 …
1370 types[_key2 - 1] = arguments[_key2];
1375 this.fail("assertType: invalid type: " + node.typename, node.lineno, node.colno);
1393 … this.fail('compileCallExtension: arguments must be a NodeList, ' + 'use `parser.parseSignature`');
1400 if (i !== args.children.length - 1 || contentArgs.length) {
1481 this.fail('compilePair: Dict keys must be strings or names', key.lineno, key.colno);
1544 return this._binOpEmitter(node, frame, ' - ');
1574 this._emit('-');
1607 return '--expression--';
1702 // preserve fall-throughs
1754 val: len + " - " + i
1757 val: len + " - " + i + " - 1"
1763 val: i + " === " + len + " - 1"
1775 // as fast as possible. ForAsync also shares some of this, but
1822 this._emitLine(i + " = -1;");
1930 if (i === node.args.children.length - 1 && arg instanceof nodes.Dict) {
1963 // will create a new run-time scope for us
2068 // If we are executing outside a block (creating a top-level
2076 // waste of performance to always execute huge top-level
2104 // template in the top-level scope
2179 this.fail('compileRoot: root node can\'t have frame');
2196 if (blockNames.indexOf(name) !== -1) {
2218 this.fail("compile: Cannot compile node: " + node.typename, node.lineno, node.colno);
2312 * A no-op template, for use with {% include ignore missing %}
2356 // The filesystem loader is only available server-side
2648 if (idx === -1 || !blk) {
2736 // causing a return from the top-most render function). But fixing that
2762 // eslint-disable-line consistent-return
2806 var func = new Function(source); // eslint-disable-line no-new-func
2898 _proto.fail = function fail(msg, lineno, colno) {
2912 this.fail('expected ' + type + ', got ' + tok.type, tok.lineno, tok.colno);
2932 this.fail('unexpected end of file');
2935 this.fail('advanceAfterBlockEnd: expected symbol token or ' + 'explicit name to be passed');
2941 if (tok.value.charAt(0) === '-') {
2945 this.fail('expected block end in ' + name + ' statement');
2952 …dingWhitespace = tok.value.charAt(tok.value.length - this.tokens.tags.VARIABLE_END.length - 1) ===…
2955 this.fail('expected variable end');
2972 this.fail('parseFor: expected for{Async}', forTok.lineno, forTok.colno);
2976 this.fail('parseFor: variable name expected for loop');
2990 this.fail('parseFor: expected "in" keyword for loop', forTok.lineno, forTok.colno);
3005 this.fail('expected macro');
3020 this.fail('expected call');
3032 if (!(args[args.length - 1] instanceof nodes.KeywordArgs)) {
3035 var kwargs = args[args.length - 1];
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);
3072 this.fail('parseFrom: expected from');
3076 this.fail('parseFrom: expected import', fromTok.lineno, fromTok.colno);
3081 // eslint-disable-line no-constant-condition
3085 this.fail('parseFrom: Expected at least one import name', fromTok.lineno, fromTok.colno);
3091 if (nextTok.value.charAt(0) === '-') {
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…
3117 this.fail('parseBlock: expected block', tag.lineno, tag.colno);
3122 this.fail('parseBlock: variable name expected', tag.lineno, tag.colno);
3130 this.fail('parseBlock: expected endblock, got end of file');
3139 this.fail('parseTemplateRef: expected ' + tagName);
3150 this.fail('parseInclude: expected ' + tagName);
3168 this.fail('parseIf: expected if, elif, or elseif', tag.lineno, tag.colno);
3189 this.fail('parseIf: expected elif, else, or endif, got end of file');
3196 this.fail('parseSet: expected set', tag.lineno, tag.colno);
3208 this.fail('parseSet: expected = or block end in set tag', tag.lineno, tag.colno);
3233 // fail early if we get some unexpected tag.
3235 this.fail('parseSwitch: expected "switch," "case" or "default"', tag.lineno, tag.colno);
3277 this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.');
3287 this.fail('tag name expected', tok.lineno, tok.colno);
3289 if (this.breakOnBlocks && lib.indexOf(this.breakOnBlocks, tok.value) !== -1) {
3328 if (lib.indexOf(ext.tags || [], tok.value) !== -1) {
3333 this.fail('unknown block tag: ' + tok.value, tok.lineno, tok.colno);
3361 rawLevel -= 1;
3369 this.tokens.backN(all.length - pre.length);
3387 this.fail('invalid index');
3395 this.fail('expected name as lookup value, got ' + val.value, val.lineno, val.colno);
3455 // eslint-disable-line no-constant-condition
3509 // eslint-disable-line no-constant-condition
3513 } else if (compareOps.indexOf(tok.value) !== -1) {
3547 while (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {
3596 if (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {
3613 this.fail('expected expression, got end of file');
3626 this.fail('invalid boolean: ' + tok.value, tok.lineno, tok.colno);
3679 this.fail('parseFilterStatement: expected filter');
3706 // eslint-disable-line no-constant-condition
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);
3744 this.fail('expected arguments', tok.lineno, tok.colno);
3754 // eslint-disable-line no-constant-condition
3763 this.fail('parseSignature: expected comma after expression', tok.lineno, tok.colno);
3798 // If the last token has "-" we need to trim the
3808 …- 1) === '-' || nextToken.type === lexer.TOKEN_VARIABLE_START && nextVal.charAt(this.tokens.tags.V…
3826 …adingWhitespace = tok.value.charAt(tok.value.length - this.tokens.tags.COMMENT_END.length - 1) ===…
3829 this.fail('Unexpected token at top-level: ' + tok.type, tok.lineno, tok.colno);
3842 // var l = lexer.lex('{%- if x -%}\n hello {% endif %}');
3872 var delimChars = '()[]{}%*-+~/#,:|.<>=!';
3883 var TOKEN_BLOCK_START = 'block-start';
3884 var TOKEN_BLOCK_END = 'block-end';
3885 var TOKEN_VARIABLE_START = 'variable-start';
3886 var TOKEN_VARIABLE_END = 'variable-end';
3888 var TOKEN_LEFT_PAREN = 'left-paren';
3889 var TOKEN_RIGHT_PAREN = 'right-paren';
3890 var TOKEN_LEFT_BRACKET = 'left-bracket';
3891 var TOKEN_RIGHT_BRACKET = 'right-bracket';
3892 var TOKEN_LEFT_CURLY = 'left-curly';
3893 var TOKEN_RIGHT_CURLY = 'right-curly';
3952 …} else if ((tok = this._extractString(this.tags.BLOCK_END)) || (tok = this._extractString('-' + th…
3978 …this._extractString(this.tags.VARIABLE_END)) || (tok = this._extractString('-' + this.tags.VARIABL…
3986 // Extract until the end of the regex -- / ends it, \/ does not.
4003 var isCurrentAFlag = POSSIBLE_FLAGS.indexOf(this.current()) !== -1;
4015 } else if (delimChars.indexOf(cur) !== -1) {
4021 if (lib.indexOf(complexOps, curComplex) !== -1) {
4026 if (lib.indexOf(complexOps, curComplex + this.current()) !== -1) {
4070 if (tok.match(/^[-+]?[0-9]+$/)) {
4104 …} else if ((tok = this._extractString(this.tags.BLOCK_START + '-')) || (tok = this._extractString(…
4107 …} else if ((tok = this._extractString(this.tags.VARIABLE_START + '-')) || (tok = this._extractStri…
4129 var lastLine = tok.slice(-this.colno);
4132 tok = tok.slice(0, -this.colno);
4206 // Extract all non-matching chars, with the default matching set
4217 // If breakOnMatch is false, a non-matching char stops it.
4226 if (breakOnMatch && first === -1 || !breakOnMatch && first !== -1) {
4233 while ((breakOnMatch && idx === -1 || !breakOnMatch && idx !== -1) && !this.isFinished()) {
4275 this.index--;
4277 this.lineno--;
4278 var idx = this.src.lastIndexOf('\n', this.index - 1);
4279 if (idx === -1) {
4282 this.colno = this.index - idx;
4285 this.colno--;
4307 return this.str.charAt(this.index - 1);
4364 // to "watch" templates over HTTP, so they are re-downloaded
4432 url += (url.indexOf('?') === -1 ? '?' : '&') + 's=' + new Date().getTime();
4543 // Array-as-queue is good enough here, since we are just dealing with exceptions.
4635 // `requestFlush` is an implementation-specific method that attempts to kick
4645 // truncate already-completed tasks.
4669 for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
4672 queue.length -= index;
4683 // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783…
4686 // have WebKitMutationObserver but not un-prefixed MutationObserver.
4698 // - Android 4-4.3
4699 // - Chrome 26-34
4700 // - Firefox 14-29
4701 // - Internet Explorer 11
4702 // - iPad Safari 6-7.1
4703 // - iPhone Safari 7-7.1
4704 // - Safari 6-7
4709 // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
4710 // 11-12, and in web workers in many engines.
4731 // - Firefox 3-13
4732 // - Internet Explorer 6-9
4733 // - iPad Safari 4.3
4734 // - Lynx 2.8.7
4747 // the text of a text node between "1" and "-1".
4754 toggle = -toggle;
4792 // However, if we ever elect to use timers in Safari, the prevalent work-around
4841 // This works in non-strict mode
4896 return (index < tasks.length - 1) ? makeCallback(index + 1): null;
5015 // Backwards-compat with node 0.10.x
5039 …throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negativ…
5060 …throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received…
5138 // Re-assign `events` because a newListener handler could have caused the
5166 // eslint-disable-next-line no-restricted-syntax
5240 if (--this._eventsCount === 0)
5248 position = -1;
5250 for (i = list.length - 1; i >= 0; i--) {
5293 if (--this._eventsCount === 0)
5322 for (i = listeners.length - 1; i >= 0; i--) {
5470 // copy-on-write version of map
5534 …stanceof nodes.Filter && lib.indexOf(asyncFilters, descNode.name.value) !== -1 || descNode instanc…
5577 // eslint-disable-line consistent-return
5646 return num !== num; // eslint-disable-line no-self-compare
5683 var spaces = width - str.length;
5684 var pre = lib.repeat(' ', spaces / 2 - spaces % 2);
5698 exports['default'] = default_; // eslint-disable-line dot-notation
5707 // eslint-disable-line guard-for-in, no-restricted-syntax
5729 return a > b ? 1 : a === b ? 0 : -1; // eslint-disable-line no-nested-ternary
5794 return arr[arr.length - 1];
5805 // Objects (besides SafeStrings), non-primative Arrays
5888 maxCount = -1;
5914 // by replacement e.g. "abc"|replace("", ".") -> .a.b.c.
5921 if (maxCount === 0 || nextIndex === -1) {
5927 while (nextIndex > -1 && (maxCount === -1 || count < maxCount)) {
6029 return reversed ? 1 : -1;
6031 return reversed ? -1 : 1;
6044 var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi;
6050 .replace(/(\r\n)/g, '\n') // normalize linebreaks (CRLF -> LF)
6081 if (idx === -1) {
6111 …//github.com/mitsuhiko/jinja2/blob/f15b814dcba6aa12bc74d1f7d0c881d55f7126be/jinja2/utils.py#L20-L23
6114 var emailRe = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i;
6293 * Returns `true` if the value is falsy - if I recall correctly, '', 0, false,
6496 var index = -1;
6500 index = -1;
6543 // eslint-disable-line for-direction
6621 // * name: name of the template (auto-generated when compiling a directory)
6626 // * include: which file/folders to include (folders are auto-included, files are auto-excluded)
6627 // * exclude: which file/folders to exclude (folders are auto-included, files are auto-excluded)
6658 precompiled.push(_precompile(fs.readFileSync(input, 'utf-8'), opts.name || input, env));
6664 precompiled.push(_precompile(fs.readFileSync(templates[i], 'utf-8'), name, env));
6669 console.error(e); // eslint-disable-line no-console
6729 /* eslint-disable camelcase */
6813 origState.colno--;
6814 origState.index--;
6836 // so re-raise the original exception.
6844 this.fail('parseSlice: too many slice components', tok.lineno, tok.colno);
6867 start = step < 0 ? obj.length - 1 : 0;
6870 stop = step < 0 ? -1 : obj.length;
6927 if ((i = this.indexOf(element)) === -1) {