Commit 2aeae8e3 authored by Daniel Brown's avatar Daniel Brown
Browse files

small fixes for const parsing

parent 14b5de02
......@@ -344,11 +344,11 @@ class kat(object):
if len(values)>0 and values[0] == 'const':
if len(values) == 3:
if len(values) >= 3:
if values[1] in constants:
raise pkex.BasePyKatException('const command with the name "{0}" already used'.format(values[1]))
constants[str(values[1])] = Constant(values[1], SIfloat(values[2]), [])
constants[str(values[1])] = Constant(values[1], values[2], [])
raise pkex.BasePyKatException('const command "{0}" was not the correct format'.format(line))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment