Lines Matching refs:lexer
5 var lexer = require('./lexer'); variable
25 if (!withWhitespace && this.peeked.type === lexer.TOKEN_WHITESPACE) {
35 while (tok && tok.type === lexer.TOKEN_WHITESPACE) {
92 return this.skipValue(lexer.TOKEN_SYMBOL, val);
101 if (tok.type !== lexer.TOKEN_SYMBOL) {
107 if (tok && tok.type === lexer.TOKEN_BLOCK_END) {
118 if (tok && tok.type === lexer.TOKEN_VARIABLE_END) {
146 if (type === lexer.TOKEN_COMMA) {
151 while (this.skip(lexer.TOKEN_COMMA)) {
250 if (nextTok.type === lexer.TOKEN_BLOCK_END) {
264 if (names.children.length > 0 && !this.skip(lexer.TOKEN_COMMA)) {
369 if (!this.skip(lexer.TOKEN_COMMA)) {
373 if (!this.skipValue(lexer.TOKEN_OPERATOR, '=')) {
374 if (!this.skip(lexer.TOKEN_BLOCK_END)) {
453 if (tok.type !== lexer.TOKEN_SYMBOL) {
496 return ext.parse(this, nodes, lexer);
547 if (tok.type === lexer.TOKEN_LEFT_PAREN) {
550 } else if (tok.type === lexer.TOKEN_LEFT_BRACKET) {
557 } else if (tok.type === lexer.TOKEN_OPERATOR && tok.value === '.') {
561 if (val.type !== lexer.TOKEN_SYMBOL) {
628 var invert = tok.type === lexer.TOKEN_SYMBOL && tok.value === 'not';
698 while (this.skipValue(lexer.TOKEN_TILDE, '~')) {
706 while (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {
714 while (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {
722 while (this.skipValue(lexer.TOKEN_OPERATOR, '*')) {
730 while (this.skipValue(lexer.TOKEN_OPERATOR, '/')) {
738 while (this.skipValue(lexer.TOKEN_OPERATOR, '//')) {
746 while (this.skipValue(lexer.TOKEN_OPERATOR, '%')) {
754 while (this.skipValue(lexer.TOKEN_OPERATOR, '**')) {
763 if (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {
765 } else if (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {
781 } else if (tok.type === lexer.TOKEN_STRING) {
783 } else if (tok.type === lexer.TOKEN_INT) {
785 } else if (tok.type === lexer.TOKEN_FLOAT) {
787 } else if (tok.type === lexer.TOKEN_BOOLEAN) {
795 } else if (tok.type === lexer.TOKEN_NONE) {
797 } else if (tok.type === lexer.TOKEN_REGEX) {
802 } else if (tok.type === lexer.TOKEN_SYMBOL) {
820 var tok = this.expect(lexer.TOKEN_SYMBOL);
822 while (this.skipValue(lexer.TOKEN_OPERATOR, '.')) {
823 name += '.' + this.expect(lexer.TOKEN_SYMBOL).value;
828 if (this.peekToken().type === lexer.TOKEN_LEFT_PAREN) {
837 while (this.skip(lexer.TOKEN_PIPE)) {
860 case lexer.TOKEN_LEFT_PAREN:
863 case lexer.TOKEN_LEFT_BRACKET:
866 case lexer.TOKEN_LEFT_CURLY:
875 …if (type === lexer.TOKEN_RIGHT_PAREN || type === lexer.TOKEN_RIGHT_BRACKET || type === lexer.TOKEN…
880 if (!this.skip(lexer.TOKEN_COMMA)) {
890 if (!this.skip(lexer.TOKEN_COLON)) {
907 if (!noParens && tok.type !== lexer.TOKEN_LEFT_PAREN) {
914 if (tok.type === lexer.TOKEN_LEFT_PAREN) {
923 if (!noParens && tok.type === lexer.TOKEN_RIGHT_PAREN) {
926 } else if (noParens && tok.type === lexer.TOKEN_BLOCK_END) {
929 if (checkComma && !this.skip(lexer.TOKEN_COMMA)) {
933 if (this.skipValue(lexer.TOKEN_OPERATOR, '=')) {
960 if (tok.type === lexer.TOKEN_DATA) {
975 …lexer.TOKEN_BLOCK_START && nextVal.charAt(nextVal.length - 1) === '-' || nextToken.type === lexer.…
980 } else if (tok.type === lexer.TOKEN_BLOCK_START) {
987 } else if (tok.type === lexer.TOKEN_VARIABLE_START) {
992 } else if (tok.type === lexer.TOKEN_COMMENT) {
1021 var p = new Parser(lexer.lex(src, opts));