Skip to content

[WIP] Implement #lolcode#15664

Closed
CodaFi wants to merge 3 commits into
swiftlang:masterfrom
CodaFi:hashbrown-lolcode
Closed

[WIP] Implement #lolcode#15664
CodaFi wants to merge 3 commits into
swiftlang:masterfrom
CodaFi:hashbrown-lolcode

Conversation

@CodaFi
Copy link
Copy Markdown
Contributor

@CodaFi CodaFi commented Apr 1, 2018

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 ObjC NO. YAGNI, or something.

@CodaFi
Copy link
Copy Markdown
Contributor Author

CodaFi commented Apr 1, 2018

Let's see what horrors await

@swift-ci please smoke test

@harlanhaskins
Copy link
Copy Markdown
Contributor

@CodaFi and I are thrilled to bring forward this groundbreaking feature on such an important day.

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", ())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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", ())

@CodaFi CodaFi closed this Apr 2, 2018
@CodaFi CodaFi deleted the hashbrown-lolcode branch April 2, 2018 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants