✨ allow missing var name on following curly bracket
This commit is contained in:
parent
8981e225e4
commit
dd13d9e32c
@ -339,6 +339,13 @@ class Juicescript_lexer {
|
||||
|
||||
// CHECK IF THERE EVEN IS A NAME //
|
||||
if(variable.length <= 0){
|
||||
// has curly bracket after it?
|
||||
if(this.peek() === "{"){
|
||||
// add token without value
|
||||
this.token_add({type: Juicescript.token_type.VARIABLE});
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore with warning
|
||||
this.warning("unexpected character '" + this.source.charAt(this.start) + "'");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user