mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
feat: support not operator, #575
This commit is contained in:
+9
-11
@@ -26,20 +26,18 @@ export class Tokenizer {
|
||||
}
|
||||
|
||||
* readExpressionTokens (): IterableIterator<Token> {
|
||||
const operand = this.readValue()
|
||||
if (!operand) return
|
||||
|
||||
yield operand
|
||||
|
||||
while (this.p < this.N) {
|
||||
const operator = this.readOperator()
|
||||
if (!operator) return
|
||||
|
||||
if (operator) {
|
||||
yield operator
|
||||
continue
|
||||
}
|
||||
const operand = this.readValue()
|
||||
if (!operand) return
|
||||
|
||||
yield operator
|
||||
yield operand
|
||||
if (operand) {
|
||||
yield operand
|
||||
continue
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
readOperator (): OperatorToken | undefined {
|
||||
|
||||
Reference in New Issue
Block a user