mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
prevents orphaned or misplaced comments from being written to symbol
files.
This commit is contained in:
parent
a517a42357
commit
84516b2ac6
1 changed files with 13 additions and 9 deletions
|
|
@ -1348,6 +1348,8 @@ BEGIN
|
|||
IF obj^.mode IN {Con, Typ, Var, LProc, XProc, CProc, IProc} THEN
|
||||
(* Write comment BEFORE the object *)
|
||||
IF obj^.comment # NIL THEN
|
||||
(* Only write comments for objects that make sense *)
|
||||
IF (obj^.mode IN {Con, Typ, Var, XProc, IProc, CProc}) & (obj^.vis # internal) THEN
|
||||
OPM.SymWInt(Scomment);
|
||||
(* Calculate actual length of comment text *)
|
||||
k := 0;
|
||||
|
|
@ -1358,6 +1360,8 @@ BEGIN
|
|||
WHILE l < k DO
|
||||
OPM.SymWCh(obj^.comment^[l]); INC(l)
|
||||
END
|
||||
END
|
||||
(* If condition is false, we skip the comment entirely *)
|
||||
END;
|
||||
|
||||
IF obj^.history = removed THEN FPrintErr(obj, 250)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue