浏览代码

* reset some variables which could be in an illegal state after an error, this is mainly important for the ide

git-svn-id: trunk@1726 -
florian 20 年之前
父节点
当前提交
a27b87043f
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/parser.pas

+ 7 - 0
compiler/parser.pas

@@ -395,6 +395,13 @@ implementation
             oldaktfilepos:=aktfilepos;
             oldaktfilepos:=aktfilepos;
             oldaktmodeswitches:=aktmodeswitches;
             oldaktmodeswitches:=aktmodeswitches;
           end;
           end;
+       { reset parser, a previous fatal error could have left these variables in an unreliable state, this is
+         important for the IDE }
+         afterassignment:=false;
+         in_args:=false;
+         got_addrn:=false;
+         getprocvardef:=nil;
+
        { show info }
        { show info }
          Message1(parser_i_compiling,filename);
          Message1(parser_i_compiling,filename);