File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,20 @@ module.exports = function(lexer, tokens) {
51
51
} else if ( ch === ']' ) {
52
52
this . popState ( ) ;
53
53
return ']' ;
54
+ } else if ( ch === '$' ) {
55
+ this . input ( ) ;
56
+ if ( this . is_LABEL_START ( ) ) {
57
+ this . consume_LABEL ( ) ;
58
+ return tokens . T_VARIABLE ;
59
+ } else {
60
+ throw new Error ( 'Unexpected terminal' ) ;
61
+ }
54
62
} else if ( this . is_LABEL_START ( ) ) {
55
63
this . consume_LABEL ( ) ;
56
64
return tokens . T_STRING ;
57
65
} else if ( this . is_WHITESPACE ( ) || ch === '\\' || ch === '\'' || ch === '#' ) {
58
66
return tokens . T_ENCAPSED_AND_WHITESPACE ;
59
- } else if ( this . is_TOKEN ( ) || ch === '{' || ch === '}' || ch === '"' || ch === '`' ) {
67
+ } else if ( ch === '[' || ch === '{' || ch === '}' || ch === '"' || ch === '`' || this . is_TOKEN ( ) ) {
60
68
return ch ;
61
69
} else {
62
70
throw new Error ( 'Unexpected terminal' ) ;
You can’t perform that action at this time.
0 commit comments