浏览代码

* Refactory: remove current_module use from top-level parsing

Michaël Van Canneyt 1 年之前
父节点
当前提交
97f159e4b2
共有 2 个文件被更改,包括 195 次插入193 次删除
  1. 3 3
      compiler/parser.pas
  2. 192 190
      compiler/pmodules.pas

+ 3 - 3
compiler/parser.pas

@@ -406,15 +406,15 @@ implementation
              if (token=_UNIT) or (compile_level>1) then
              if (token=_UNIT) or (compile_level>1) then
                begin
                begin
                  current_module.is_unit:=true;
                  current_module.is_unit:=true;
-                 finished:=proc_unit;
+                 finished:=proc_unit(current_module);
                end
                end
              else if (token=_ID) and (idtoken=_PACKAGE) then
              else if (token=_ID) and (idtoken=_PACKAGE) then
                begin
                begin
                  current_module.IsPackage:=true;
                  current_module.IsPackage:=true;
-                 proc_package;
+                 proc_package(current_module);
                end
                end
              else
              else
-               proc_program(token=_LIBRARY);
+               proc_program(current_module,token=_LIBRARY);
            except
            except
              on ECompilerAbort do
              on ECompilerAbort do
                raise;
                raise;

文件差异内容过多而无法显示
+ 192 - 190
compiler/pmodules.pas


部分文件因为文件数量过多而无法显示