Move INVALID_POSITION from header to C source - #27

This commit is contained in:
Josh Holtrop 2024-07-21 13:39:05 -04:00
parent 092fce61eb
commit c5b8fc28bd
2 changed files with 3 additions and 3 deletions

View File

@ -566,6 +566,9 @@ size_t <%= @grammar.prefix %>lex(<%= @grammar.prefix %>context_t * context, <%=
* Parser
*************************************************************************/
/** Invalid position value. */
#define INVALID_POSITION (<%= @grammar.prefix %>position_t){0xFFFFFFFFu, 0xFFFFFFFFu}
/** Reduce ID type. */
typedef <%= get_type_for(@parser.reduce_table.size) %> reduce_id_t;

View File

@ -52,9 +52,6 @@ typedef struct
uint32_t col;
} <%= @grammar.prefix %>position_t;
/** Invalid position value. */
#define INVALID_POSITION (<%= @grammar.prefix %>position_t){0xFFFFFFFFu, 0xFFFFFFFFu}
/** Return whether the position is valid. */
#define <%= @grammar.prefix %>position_valid(p) ((p).row != 0xFFFFFFFFu)