Skip to content
Snippets Groups Projects
Commit 2aeae8e3 authored by Daniel Brown's avatar Daniel Brown
Browse files

small fixes for const parsing

parent 14b5de02
No related branches found
No related tags found
No related merge requests found
......@@ -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]))
else:
constants[str(values[1])] = Constant(values[1], SIfloat(values[2]), [])
constants[str(values[1])] = Constant(values[1], values[2], [])
else:
raise pkex.BasePyKatException('const command "{0}" was not the correct format'.format(line))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment