Lines Matching refs:peek

80   peek: function() {  method in Parser
81 return this.tokens.peek();
106 while ('eos' != this.peek().type) {
107 if ('newline' == this.peek().type) {
109 } else if ('text-html' == this.peek().type) {
134 if (this.peek().type === type) {
137 …error('INVALID_TOKEN', 'expected "' + type + '", but got "' + this.peek().type + '"', this.peek());
149 if (this.peek().type === type) {
206 switch (this.peek().type) {
232 return this.initBlock(this.peek().loc.start.line, this.parseTextHtml());
253 if (!this.peek().loc.start) debugger;
257 loc: this.peek().loc,
262 var pluginResult = this.runPlugin('expressionTokens', this.peek());
264 this.error('INVALID_TOKEN', 'unexpected token "' + this.peek().type + '"', this.peek());
279 var lineno = this.peek().loc.start.line;
280 var nextTok = this.peek();
310 var nextType = this.peek().type;
331 nextTok = this.peek();
342 switch (this.peek().type) {
420 while ('outdent' != this.peek().type) {
421 switch (this.peek().type) {
433 var pluginResult = this.runPlugin('caseTokens', this.peek(), block);
435 this.error('INVALID_TOKEN', 'Unexpected token "' + this.peek().type
436 + '", expected "when", "default" or "newline"', this.peek());
452 if (this.peek().type !== 'newline') {
516 block = 'indent' == this.peek().type;
519 …s.error('BLOCK_IN_BUFFERED_CODE', 'Buffered code cannot have a block attached to it', this.peek());
539 if ('indent' == this.peek().type) {
545 if (this.peek().type === 'newline') {
547 } else if (this.peek().type === 'else-if') {
560 if ('indent' == this.peek().type) {
563 } else if (this.peek().type === 'else') {
565 if (this.peek().type === 'indent') {
587 if ('indent' == this.peek().type) {
604 var body = this.peek();
608 while (this.peek().type !== 'end-pipeless-text') {
687 if (this.peek().type === 'start-attributes') {
709 if (this.peek().type === 'start-attributes') {
713 if (this.peek().type === 'text') {
724 } else if (this.peek().type === 'filter') {
757 if (this.peek().type == 'else') {
793 var node = 'indent' == this.peek().type ? this.block() : this.emptyBlock(tok.loc.start.line);
843 while (this.peek().type === 'filter') {
853 … node.block = 'indent' == this.peek().type ? this.block() : this.emptyBlock(tok.loc.start.line);
863 if (this.peek().type === 'indent') {
864 this.error('RAW_INCLUDE_BLOCK', 'Raw inclusion cannot contain a block', this.peek());
909 if ('indent' == this.peek().type) {
936 while (this.peek().type !== 'end-pipeless-text') {
990 while ('outdent' != this.peek().type) {
991 if ('newline' == this.peek().type) {
993 } else if ('text-html' == this.peek().type) {
1063 switch (this.peek().type) {
1084 …console.warn(this.filename + ', line ' + this.peek().loc.start.line + ':\nYou should not have pug …
1100 … var pluginResult = this.runPlugin('tagAttributeTokens', this.peek(), tag, attributeNames);
1107 if ('dot' == this.peek().type) {
1113 switch (this.peek().type) {
1145 var pluginResult = this.runPlugin('tagTokens', this.peek(), tag, options);
1147 …his.peek().type + '` expected `text`, `interpolated-code`, `code`, `:`' + (selfClosingAllowed ? ',…
1151 while ('newline' == this.peek().type) this.advance();
1156 } else if ('indent' == this.peek().type) {