Having all the comments separately from all the other flowchart items is not very convenient for the further stages, because the leading and side comments are tightly related to the corresponding items. So there is the stage of merging the comments with the other recognized items.
For example, a CodeBlock structure has fields for leading and side
comments which have the
None value after a syntax tree analysis but at
the comments merging stage they get filled as in this example. The merging is done
basing on the line numbers which are coming from the syntax tree and from the
extracting comments pass.