pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
306 stars 72 forks source link

Operators `__static_assert` and `__static_check` #614

Closed Daniel-Cortez closed 3 years ago

Daniel-Cortez commented 3 years ago

What this PR does / why we need it:

Implements operators __static_assert and __static_check using @YashasSamaga's implementation as a base (see #300).

The most notable differences from the original implementation are:

Which issue(s) this PR fixes:

Fixes #294

What kind of pull this is:

Additional Documentation:

This PR is built upon the changes from #602, so you'll want to review and merge that PR first.

Daniel-Cortez commented 3 years ago

Rebased to the latest changes from #602.

Daniel-Cortez commented 3 years ago

Implemented a new mechanism that allows to record tokens read by function lex(). With this, __static_assert and __static_check can now properly display multi-line expressions in error/warning messages.