[WIP] Implement #lolcode#15664
Closed
CodaFi wants to merge 3 commits into
Closed
Conversation
Loops and switch statements will be handled in a future patch
Contributor
Author
|
Let's see what horrors await @swift-ci please smoke test |
Contributor
|
@CodaFi and I are thrilled to bring forward this groundbreaking feature on such an important day. |
jrose-apple
reviewed
Apr 1, 2018
| ERROR(statement_lolcode_no_yarly,none, | ||
| "expected 'YA RLY' statement after 'O RLY?' statement", ()) | ||
| ERROR(statement_lolcode_aggressive_orly,none, | ||
| "'O RLY?' statement must be phrased as a question", ()) |
Contributor
There was a problem hiding this comment.
It seems unfortunate that the error messages for LOLCODE (sic) are in the same formal tone as the ones for the rest of the compiler. To make this part of the language more compelling, I suggest having form follow…something…and taking inspiration from the syntax itself:
ERROR(expected_of_lolcode_builtin,PointsToFirstBadToken,
"ABSENCE OF 'OF" -> NO COMPILER LOVE", ())
ERROR(statement_lolcode_same_line_without_comma,none,
"WHY CANT I HOLD ALL THESE STATMENTS", ())
ERROR(statement_lolcode_no_yarly,none,
"DONT LEAV ME HANGIN", ())
ERROR(statement_lolcode_aggressive_orly,none,
"Q U E S T I O N E V E R Y T H I N G", ())
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the corresponding implementation of #lolcode.
We are still working through the particulars of loops and switches because the spec is quite vague on some points, hence WIP.
Also, while implementing this we realized that LOLCode reserves A, Z, O, and R as keywords - and stdlib uses those as generic argument names. It also reserves
NO, so I took the opportunity to just remove that little error we make for ObjCNO. YAGNI, or something.