harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 2f73c197e3b0903e38e430cb9936d9fd11dfc219
parent 2477319016ff3517bf85e2865af46d822191c686
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Thu,  2 Jun 2022 00:33:42 +0200

document enum resolution in the declaration solver explanation

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Mdocs/declaration_solver.txt | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/docs/declaration_solver.txt b/docs/declaration_solver.txt @@ -21,6 +21,13 @@ and inserting all the fields into it in the correct order. At this point the defines can be copied from the dedicated scope into the unit scope, shadowing the declarations from the source files. +Next, aliases of enum types are detected and taken care of. A list of aliases +is build for each declared enum, so that in the process when enum values are +completed, the same value is declared in enum aliases' namespaces too. +Additionally, every enum value that is already completed (the ones that were +imported from another module) gets instantly copied to each enum alias' +namespace. + With everything but the declarations in place, the core part of the algorithm is started: