From 00ad38e5fe984e3d8bf04dd3fa9b649d68182062 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Mon, 16 Sep 2024 14:47:09 -0400 Subject: [PATCH] Put N_ERROR at the end. --- src/expr.c | 4 ++-- src/types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/expr.c b/src/expr.c index 9ead59a2..1ff26673 100644 --- a/src/expr.c +++ b/src/expr.c @@ -38,8 +38,8 @@ 5) N_BUILTIN_FUNC: A reference to a built-in function 6) N_USER_FUNC: A reference to a user-defined function 7) N_OPERATOR: A reference to an operator such as "+" or "&&" - 8) N_ERROR: A node resulting from a parse error - 9) N_SHORT_STR: A string constant short enough to store in u.name + 8) N_SHORT_STR: A string constant short enough to store in u.name + 9) N_ERROR: An uninitialized node, or a parse error Additional types are N_SHORT_VAR, N_SHORT_SYSVAR, and N_SHORT_USER_FUNC which behave identically to N_VARIABLE, N_SYSVAR and N_USER_FUNC diff --git a/src/types.h b/src/types.h index e4526047..8fc61b6d 100644 --- a/src/types.h +++ b/src/types.h @@ -41,8 +41,7 @@ typedef struct { /* New-style expr_node structure and constants */ enum expr_node_type { - N_FREE, - N_ERROR, + N_FREE = 0, N_CONSTANT, N_SHORT_STR, N_LOCAL_VAR, @@ -54,6 +53,7 @@ enum expr_node_type N_SHORT_USER_FUNC, N_USER_FUNC, N_OPERATOR, + N_ERROR = 32767, }; /* Structure for passing in Nargs and out RetVal from functions */