Remove the error action; a lack of actions implies an error.

This commit is contained in:
Max Brunsfeld 2016-06-21 22:53:48 -07:00
parent 6a7a5cfc3f
commit 43ae8235fd
5 changed files with 52 additions and 65 deletions

View file

@ -60,7 +60,6 @@ typedef struct TSLexer {
} TSLexer;
typedef enum {
TSParseActionTypeError,
TSParseActionTypeShift,
TSParseActionTypeReduce,
TSParseActionTypeAccept,
@ -75,7 +74,7 @@ typedef struct {
unsigned short child_count;
};
};
TSParseActionType type : 3;
TSParseActionType type : 4;
bool extra : 1;
bool fragile : 1;
} TSParseAction;
@ -146,11 +145,6 @@ struct TSLanguage {
* Parse Table Macros
*/
#define ERROR() \
{ \
{ .type = TSParseActionTypeError } \
}
#define SHIFT(to_state_value) \
{ \
{ .type = TSParseActionTypeShift, .to_state = to_state_value } \