Making a compiler (ep 5) calling G1ANT commands


33 commits, 44 files changed, +3k additions, 1 (① one) feature…

So bappin happy this feature is finally in a working state. I’ve been procrastinating this hippo for so long, but now it’s implemented and it works wonders!

In G1ANT you have commands and not functions to call, and they use a kind of out parameter structure for the commands results. Like for example, to get the result from a dialog box you do it like this:

Sample G1ANT.Robot code using dialog.ask

But I’m like, “Hey I want to use return values.”

So my solution is as a like this one: If used as a return value, just translate it into an out param! BriLLIanT! (+ some other stuff in complex scenarios)

Glance at the following Robot++ and generated Robot code example below:

Compiled code using return values

Slick AF if you ask me! Especially the tmp vars stuff! They’re extra hot B]

The project is apparently at 5k lines of C# code so far, according to this poopscript: https://github.com/rrwick/LinesOfCodeCounter

LinesOfCodeCounter output

That’s it for todais bost,

Cheez-in-yo firehouse!

This post was originally posted (by me) here: https://itsa-me-jag.tumblr.com/post/172518769667/making-a-compiler-ep-5-calling-g1ant-commands