-
Notifications
You must be signed in to change notification settings - Fork 12
Froglet Error Message Changes #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
added error messages to *, ^, ~, and &. also added a new error message for |.
changed error messages to format of: The `&` operator is not used in Froglet, but is reserved for use in other Forge languages. If you meant intersection, use `and` or `&&` instead.
| (when (eq? (nodeinfo-lang (node-info expr-node)) LANG_ID) | ||
| (define loc (nodeinfo-loc (node-info expr-node))) | ||
| (raise-bsl-relational-error "&" expr-node loc))) | ||
| (raise-bsl-relational-error "&" expr-node loc "The `&` operator is not used in Froglet, but is reserved for use in other Forge languages. If you meant intersection, use `and` or `&&` instead."))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If you meant logical and..." (since intersection is not allowed, we don't want to bring that up)
| (raise-bsl-relational-error "&" expr-node loc))) | ||
| (raise-bsl-relational-error "&" expr-node loc "The `&` operator is not used in Froglet, but is reserved for use in other Forge languages. If you meant intersection, use `and` or `&&` instead."))) | ||
|
|
||
| (define (check-node-expr-op-| expr-node node-type child-types) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm this is being registered with the lang-specific error framework. ( The | character isn't an operator, it's a reserved token. ) This seems like something we might want to include in the parser errors, when we can make them.
| (raise-bsl-relational-error-expr-args "&" expr-args loc))) | ||
| (raise-bsl-relational-error-expr-args "&" expr-args loc "The `&` operator is not used in Froglet, but is reserved for use in other Forge languages. If you meant intersection, use `and` or `&&` instead."))) | ||
|
|
||
| (define (check-args-node-expr-op-| expr-args info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to comment for | case above.
updated error changes after review
shoujohnny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted error messages in response to feedback!
|
Redirecting this to a feature branch so I can adjust error test cases without putting |
* fix: join parsing, regression test, note on 2nd issue * add: semantics test * add: tests, no-op change to parser for readability * add: revisions to get core (strings, for the moment) to sterling * fix: unsat but no core * stop sending core in place of source * Froglet Error Message Changes (#306) * update: error messages --------- Co-authored-by: shoujohnny <johnson_shou@brown.edu>
The
^operator is not used in Froglet, but is reserved for use in other Forge languages. If you meant exclusive-or, use thexoroperator instead.The
->operator is only used for field declaration in Froglet.Used this format