DEADSOFTWARE

cpmake: read module fully
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 24 Feb 2020 16:15:15 +0000 (19:15 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 24 Feb 2020 16:15:15 +0000 (19:15 +0300)
src/generic/Dsw/Mod/MakeMain.cp

index 8e68f87b001903a82a4156c9becf12862ad997b6..989b8bcb2ce6727184062b5f0eb9489993a5acbf 100644 (file)
@@ -477,6 +477,29 @@ MODULE DswMakeMain;
           END
         END;
         CheckSym(semicolon)
+      END;
+      LOOP (* preprocessor must read module fully *)
+        IF sym = end THEN
+          DevCPS.Get(sym);
+          IF sym = ident THEN
+            DevCPS.Get(sym);
+            IF sym = period THEN
+              IF DevCPS.name # SelfName THEN err(4) END;
+              EXIT
+            ELSIF sym = eof THEN
+              err(period);
+              EXIT
+            END
+          ELSIF sym = eof THEN
+            err(ident);
+            EXIT
+          END;
+        ELSIF sym = eof THEN
+          err(end);
+          EXIT
+        ELSE
+          DevCPS.Get(sym);
+        END
       END
     ELSE err(ident)
     END;