ForNeVeR / Cesium

C compiler for the CLI platform
MIT License
381 stars 42 forks source link

Simplify declarations #714

Closed kant2002 closed 1 week ago

kant2002 commented 1 week ago

We somehow have 3 types of large IR structures, expressions, block items and declarations. If expression and block items is somewhat simple things, which follow rules, declaration is a thing in it's own which behave as block item, but do not have any lowering, even if they have tree structure. This simplifies declarations a bit, and remove nesting. Place multiple declarations into compound statement.

I'm not sure that this is last refactoring of this area, but at least this is gives idea of what should be done.