Clarify type checking is also required for arrays

This commit is contained in:
Alex Hirsch 2019-03-01 20:49:37 +01:00
parent 4bac853cba
commit 116e0c5c49

View File

@ -359,7 +359,8 @@ As the parser only does syntactic checking, additional semantic checks are imple
- Checking for presence of `main` and correct signature - Checking for presence of `main` and correct signature
- Checking that all execution paths of a non-void function return a value - Checking that all execution paths of a non-void function return a value
- Type checking (remember, neither implicit nor explicit type conversions) - Type checking (remember, neither implicit nor explicit type conversions)
- This also includes checking arguments and return types for call expressions. - Includes checking operations on arrays
- Includes checking arguments and return types for call expressions
In addition to the AST, *symbol tables* are created and used for semantic checking. In addition to the AST, *symbol tables* are created and used for semantic checking.
Be sure to correctly model [*shadowing*](https://en.wikipedia.org/wiki/Variable_shadowing). Be sure to correctly model [*shadowing*](https://en.wikipedia.org/wiki/Variable_shadowing).