Skip to content

Commit

Permalink
Merge pull request #1812 from makenowjust/fix-1729
Browse files Browse the repository at this point in the history
Add "Unexpected void value expression" error
  • Loading branch information
kddnewton authored Nov 14, 2023
2 parents 678ab97 + d60948b commit 03f8d5b
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 28 deletions.
1 change: 1 addition & 0 deletions include/prism/diagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ typedef enum {
PM_ERR_UNARY_RECEIVER_TILDE,
PM_ERR_UNDEF_ARGUMENT,
PM_ERR_UNTIL_TERM,
PM_ERR_VOID_EXPRESSION,
PM_ERR_WHILE_TERM,
PM_ERR_WRITE_TARGET_READONLY,
PM_ERR_WRITE_TARGET_UNEXPECTED,
Expand Down
1 change: 1 addition & 0 deletions src/diagnostic.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ static const char* const diagnostic_messages[PM_DIAGNOSTIC_ID_LEN] = {
[PM_ERR_UNARY_RECEIVER_PLUS] = "Expected a receiver for unary `+`",
[PM_ERR_UNARY_RECEIVER_TILDE] = "Expected a receiver for unary `~`",
[PM_ERR_UNTIL_TERM] = "Expected an `end` to close the `until` statement",
[PM_ERR_VOID_EXPRESSION] = "Unexpected void value expression",
[PM_ERR_WHILE_TERM] = "Expected an `end` to close the `while` statement",
[PM_ERR_WRITE_TARGET_READONLY] = "Immutable variable as a write target",
[PM_ERR_WRITE_TARGET_UNEXPECTED] = "Unexpected write target",
Expand Down
Loading

0 comments on commit 03f8d5b

Please sign in to comment.