Closed mewmew closed 8 years ago
typedef
keyword in the hand-written lexer (added with commit 5b6868a)The type-checker now makes use of TypeDecl
nodes to add type keywords to the universe scope. We should still make sure that the type keywords (e.g. int
, char
, void
) are not re-defined in nested scopes using type declarations. A TODO for this is already in the code base. We may close this issue when the TODO has been resolved.
We should definitely make sure that type keywords (e.g. int
) may not be redeclared. However, as uC does not include typedef
in its subset of C, we may safely assume that uC programs do not redefine the keyword types.
Marked as a future ambition. Closing for now.
Add support for type declarations, which could clean up corner cases in the type-checker, and eventually allow for user-defined types.
Type
ast.TypeDecl
node, will be implemented now, and the static semantic analysis type-checker will be extended to include keyword type declarations in the universe scope.hand/lexer
gocc/grammar
sem/typecheck
The parser will be extended in the future to allow for user-defined type declarations.