diff options
Diffstat (limited to 'src/file_comments.ads')
-rw-r--r-- | src/file_comments.ads | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/file_comments.ads b/src/file_comments.ads index 633d15d24..aa1f3806c 100644 --- a/src/file_comments.ads +++ b/src/file_comments.ads @@ -37,10 +37,22 @@ package File_Comments is -- Discard unassigned comments ? procedure Discard_Comments (File : Source_File_Entry); - -- Assign node N to the last comments scanned. + type Comments_Range_Type is private; + + -- Save comments recently scanned and not yet gathered. + procedure Save_Comments (File : Source_File_Entry; + Rng : out Comments_Range_Type); + + -- Assign node N to the saved RNG comments. -- This procedure is called by the parser when a node that could be -- annotated with a comment is parsed. procedure Gather_Comments (File : Source_File_Entry; + Rng : Comments_Range_Type; + N : Uns32); + + -- Assign node N to the last comments scanned. + -- Identical to Save_Comments followed by above Gather_Comments. + procedure Gather_Comments (File : Source_File_Entry; N : Uns32); -- Reassign comments to node N. @@ -78,6 +90,11 @@ package File_Comments is Idx : Comment_Index) return Comment_Index; private + type Comments_Range_Type is record + -- Range of saved comments. + First, Last : Comment_Index; + end record; + type Comment_Record is record -- Comment range in the source. Start : Source_Ptr; |