10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-10-05 15:56:08 +02:00

Missing parenteses in assert detected

This commit is contained in:
Anthony Scemama 2015-03-16 14:55:35 +01:00
parent 78eb6dae1b
commit 711eb39eb9

View File

@ -522,6 +522,8 @@ def irp_simple_statements(text):
def process_assert(line):
assert type(line) == Assert
if command_line.do_assert:
if '(' not in line.text or ')' not in line.text:
error.fail(line,"Syntax error in ASSERT statement (parentheses)")
condition = "(%s"%(line.text.split('(',1)[1])
if condition == "":
error.fail(line,"Error in Assert statement")