Incorrect processing order for #endif directive at the end of the file

Description

The following code fragment has the #endif directive in the end which is associated with EOF token and is processed before other tokens here. It breaks some specific processing like our solution for `if #available` conversion. Furthermore, it breaks the proper order of converted constructions such as the following:

Would be converted into:

I examined code responsible for tokens processing and the most straight-forward solution is check (if they are exactly have to be tied with previous code lines) and append them to the previous trailing hiddenTokens instead of binding to the EOF as its leading hidden ones.
Could you have any other ideas?

Environment

None

Activity

Show:
Alex Petuschak
August 14, 2020, 9:41 AM

Let's revisit this after sorting out other most important tasks.

Assignee

Serhii Kuzmychov

Reporter

Dmitry Rassadin

Labels

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure