Commit cd182a40 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Don't try to access context on syntax error

parent 378fea90
......@@ -816,8 +816,8 @@ class TextSymbol(HorizontalSymbol):
except AttributeError:
# context may not have variables/timers (eg if context = block)
pass
CONTEXT.procedures = list(set(CONTEXT.procedures + ast.procedures))
try:
CONTEXT.procedures = list(set(CONTEXT.procedures + ast.procedures))
CONTEXT.fpar.extend(ast.fpar)
except AttributeError:
pass
......
......@@ -3,7 +3,7 @@ PROCESS orchestrator
/* CIF COMMENT (405, 192), (71, 35) */
COMMENT 'Hello';
/* CIF TEXT (0, 94), (398, 293) */
dcl seq tastE_Peek_id_list;
dcl seq tastE_Peek_id_list := { 1,2,3,4,5};
dcl fixed FixedString := 'Hello';
dcl variable VariableString := 'Hello';
......@@ -17,12 +17,15 @@ dcl seqen2 SeqEnumFix := { hello, world };
dcl myenum MyEnum := a;
dcl check tasTE_Peek_id;
dcl check tasTE_Peek_id := 42;
dcl choice Mychoice;
dcl choice Mychoice := c1:TRUE ;
dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
/* CIF ENDTEXT */
/* CIF PROCEDURE (1273, 175), (106, 35) */
PROCEDURE emptyproc;
ENDPROCEDURE;
/* CIF PROCEDURE (1306, 371), (91, 35) */
PROCEDURE numProc;
/* CIF START (161, 82), (70, 35) */
......@@ -40,9 +43,6 @@ dcl opt SeqOpt := { A TRUE, b FALSE }; -- test optional fields
/* CIF RETURN (178, 348), (35, 35) */
RETURN ;
ENDPROCEDURE;
/* CIF PROCEDURE (1273, 175), (106, 35) */
PROCEDURE emptyproc;
ENDPROCEDURE;
/* CIF START (596, 224), (80, 36) */
START;
/* CIF TASK (564, 275), (144, 35) */
......
Markdown is supported
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