Skip to content

Commit 7d1ca0c

Browse files
committed
1 parent 8677c64 commit 7d1ca0c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lexer/property.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,20 @@ module.exports = function(lexer, tokens) {
5151
} else if (ch === ']') {
5252
this.popState();
5353
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+
}
5462
} else if (this.is_LABEL_START()) {
5563
this.consume_LABEL();
5664
return tokens.T_STRING;
5765
} else if (this.is_WHITESPACE() || ch === '\\' || ch === '\'' || ch === '#') {
5866
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()) {
6068
return ch;
6169
} else {
6270
throw new Error('Unexpected terminal');

0 commit comments

Comments
 (0)