diff options
Diffstat (limited to 'src/ast.h')
| -rw-r--r-- | src/ast.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -65,6 +65,8 @@ typedef struct ast_list_s { } ast_list_t; typedef struct arg_ast_s { + file_t *file; + const char *start, *end; const char *name, *alias; type_ast_t *type; ast_t *value; @@ -88,6 +90,7 @@ typedef enum { } type_ast_e; typedef struct tag_ast_s { + const char *start, *end; const char *name; arg_ast_t *fields; struct tag_ast_s *next; @@ -160,7 +163,12 @@ struct type_ast_s { case MinusUpdate: \ case ConcatUpdate: \ case LeftShiftUpdate: \ - case UnsignedLeftShiftUpdate + case UnsignedLeftShiftUpdate: \ + case RightShiftUpdate: \ + case UnsignedRightShiftUpdate: \ + case AndUpdate: \ + case OrUpdate: \ + case XorUpdate #define UPDATE_CASES \ PowerUpdate: \ case MultiplyUpdate: \ @@ -271,6 +279,7 @@ typedef enum { Extend, ExplicitlyTyped, } ast_e; +#define NUM_AST_TAGS (ExplicitlyTyped + 1) struct ast_s { ast_e tag; @@ -470,7 +479,9 @@ struct ast_s { } __data; }; -const char *ast_source(ast_t *ast); +extern const int op_tightness[NUM_AST_TAGS]; + +OptionalText_t ast_source(ast_t *ast); Text_t ast_to_sexp(ast_t *ast); const char *ast_to_sexp_str(ast_t *ast); |
