From 3b713819427268d6012cf25e1934f89144c18593 Mon Sep 17 00:00:00 2001 From: Jan Walter Date: Tue, 17 Sep 2019 22:53:08 +0200 Subject: [PATCH] Percentage token has .tvalue as float - `str` was expected - e.g. `=IF(RANGE>75%; 1; 0)` fails since `75%` is translated to .75 - while `=IF(RANGE>.75; 1; 0)` would translate to '0.75' --- koala/ast/astnodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koala/ast/astnodes.py b/koala/ast/astnodes.py index 03bceb44..28c033f8 100644 --- a/koala/ast/astnodes.py +++ b/koala/ast/astnodes.py @@ -317,7 +317,7 @@ def emit(self,ast,context=None, pointer = False): childs = args[0].children(ast) for child in childs: - if ':' in child.tvalue and child.tvalue != ':': + if ':' in str(child.tvalue) and child.tvalue != ':': is_range = True range = child.tvalue break