Actually make the reference implementation follow spec
Technically true and false were being represented in variable expansion as True and False because Python is weird; this has now been rectified.
This commit is contained in:
parent
f61d38cc1a
commit
79cc290c90
|
@ -100,9 +100,15 @@ class Evaluator:
|
|||
if t.type=="TARGET":
|
||||
targets[t.value]=i
|
||||
return targets
|
||||
def str(self,value):
|
||||
if value is True:
|
||||
return "true"
|
||||
if value is False:
|
||||
return "false"
|
||||
return str(value)
|
||||
def expand_values(self,s):
|
||||
for key, value in self.values.items():
|
||||
s = s.replace("{{"+key+"}}",str(value))
|
||||
s = s.replace("{{"+key+"}}",self.str(value))
|
||||
return s
|
||||
def command_goto(self):
|
||||
target = self.next("STEM")
|
||||
|
|
Loading…
Reference in New Issue