DEADSOFTWARE

Coco/R возвращает коды ошибок
[dsw-obn.git] / tools / Coco / Coco.obn
index 5f43695f899a8fa619e4ddbbe0d6cb0183c02da8..aa8d1c1ad20ba1cc0c66bb3c3c016b6f8eaa2c7d 100644 (file)
@@ -158,13 +158,15 @@ BEGIN
                IF time >= 0 THEN src := t; pos := beg; s.s := " " END
        END;
        IF src # NIL THEN
-               Texts.WriteString (w, "Coco/R - Compiler-Compiler V2.2"); Texts.Append(Oberon.Log, w.buf);
+               Texts.WriteString(w, "Coco/R - Compiler-Compiler V2.2"); Texts.WriteLn(w); Texts.Append(Oberon.Log, w.buf);
                i := 0; WHILE i < 10 DO CRT.ddt[i] := FALSE; INC(i) END;
                Options(s);
-               Texts.WriteLn(w); Texts.WriteString(w, s.s); Texts.Append(Oberon.Log, w.buf);
                CRS.Reset(src, pos, Error); lastErrPos := -10;
                CRP.Parse
-       END
+       ELSE
+               INC(CRS.errors);
+       END;
+       IF CRS.errors # 0 THEN HALT(1) END
 END Compile;
 
 BEGIN