-
Notifications
You must be signed in to change notification settings - Fork 104
Validity Checker
martin-henz edited this page Feb 29, 2020
·
7 revisions
The purpose of the validity checker is to:
- Reject any return statements outside of function definitions and declarations.
- Reject any return statements inside of while and for loops (that are not in any function definitions and declarations in that loop).
- Reject any assignments to the loop control variable in for loops.
- Reject any assignments to names declared with const or function.
- Annotate any function declaration in a statement sequence as typable, if there are only function declarations before it in the sequence.
- Annotate any const or let declaration in a statement sequence as typable, if its name does not occur in its own right-hand side or in any statement before it in the sequence.
(here goes a more detailed specification: input:..., output:...)