hawkw / decaf

like Java, but less so
hawkweisman.me/decaf
Other
18 stars 4 forks source link

Add detection for improper statements #35

Closed hawkw closed 9 years ago

hawkw commented 9 years ago

From Dr. Jumadinova's handout:

*** Test expression must have boolean type
*** break is only allowed inside a loop
*** Incompatible return : int given, void expected 

Used to report improper statements.

hawkw commented 9 years ago

The first one ("Test expression must have boolean type") is implemented in 67359d7.

hawkw commented 9 years ago

The break one was finished in the (amusingly-named) daadfed.

hawkw commented 9 years ago

The incompatible return one definitely works too, but I can't remember in which commit....