UnionCompilerDesign / compiler_core

The core of the compiler, runtime, and builder setup.
MIT License
1 stars 1 forks source link

SyntaxElement - C99 Update #98

Closed CalebLItalien closed 3 weeks ago

CalebLItalien commented 1 month ago

Details

Now that we're switching to the C99 syntax, SyntaxElement and the parser will need to construct AST's that are in line with this standard. This will involve adding some SyntaxElements and removing others.

Issue Type

Requirements

Notes

Please do NOT implement parser functions that are required for new tokens in this issue. This issue is just adding new SyntaxElements not implementing them all. See issues tagged with Parser - <issue_name> for the new functions that need to be implemented.

tbreimer14 commented 1 month ago

@livigwinnett @CalebLItalien how do you guys think we should handle signed/unsigned/constant initalizations? Should it be a field of a the Initalization variant or are we doing this a different way?

CalebLItalien commented 1 month ago

@tbreimer14 My thought for this was for 'SyntaxElement::Initialization' to not actually hold any information. It's children would be a 'Type', 'Identifier', and optionally (I think in the current implementation it needs to be made optional) an 'AssignedValue' that would have a singe child, a constant or variable.