Skip to content
Snippets Groups Projects
Commit 971a23dc authored by benjamin.franksen's avatar benjamin.franksen
Browse files

snc: restructured parsing of types

We now build normal syntax nodes during parsing, re-using node types from
the expression syntax (E_VAR, E_BINOP, E_PRE, E_SUBSCR, E_FUNC). Together
with the recent change in generating types, this means we no longer need the
backward parent links in the type structure. Most of the code in var_types.c
is now much easier to understand and modify.

Also made the tentative change to represent "const" not as a type node with
a child pointer, but rather with a boolean flag. This is in anticipation of
adding the "pv" type operator in the hope that using yet another flag to
represent it will make analysis of a type easier. It could well be that I
revert this change if it turns out that this makes things more difficult. A
first indication is that in var_types.c this already complicates some of the
routines. So I left most of the T_CONST cases in there, only disabled them
with #if 0...#endif.
parent 6b030693
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment