bwinton / language-human-resource-machine

An Atom Grammer for Human Resource Machine code.
MIT License
1 stars 1 forks source link

Some valid HRM files are not highlighted #2

Open sixlettervariables opened 8 years ago

sixlettervariables commented 8 years ago

So, I'm not certain how "big" of an issue this is--seeing as how the game never spits out source that looks like this--but HRM supports interesting whitespace rules.

Good:

-- if there is no argument, or it is after a label, you can put instructions on the same line
inbox: INBOX OUTBOX INBOX
COPYFROM
   4
COPYTO [     9      ]
BUMPUP [
 -- and this
2]
JUMP inbox

Bad:

-- Can't have an instruction follow an argument, need a newline
COPYTO 2 INBOX
JUMP a OUTBOX
bwinton commented 8 years ago

Seems legit. I don't know how soon I'll be able to get to it, but I'll see what I can do. :smiley:

sixlettervariables commented 8 years ago

I took a stab at it, but I'm not well enough versed in the grammar for Atom.

bwinton commented 8 years ago

(Me either! This was my first grammer for Atom… The Textmate docs helped a little, but not much.) If you wanted to send what you had as a pull request, it might help.