Mindustry

Mindustry

Not enough ratings
VCode Compiler
   
Award
Favorite
Favorited
Unfavorite
Tags: mod
File Size
Posted
Updated
21.589 KB
May 28, 2021 @ 2:12pm
Nov 4, 2023 @ 4:57pm
16 Change Notes ( view )

Subscribe to download
VCode Compiler

Description
Compiler for a mindustry programming language.
Tokens:
func,call,if,elif,else,while,break,continue,return,end,wait,cmd
See example: https://pastebin.com/3vTgba6k
2 Comments
Sirvoid  [author] May 31, 2021 @ 1:11pm 
From xyzzy529:
Excellent VCode. :steamthumbsup: It really makes writing the Scripts easier.
I made some additions to change the Memory Cell usage to put the _retCount at 62-- instead of 0++ because many other Logic Scripts already use the Cell lower slots.
Also created a Comment line that gets put into the code as:
set_Comment "your comment here"
The comment makes the resulting code easier to read (and who doesn't like comments).
Also added a 'noend' tokenFunc so that the user can choose to end the Script with 'end' or drop off without it. There seems do be a difference in what gets cleared with and without an actual end.

Thinking about adding the script commands as Tokens so the 'cmd' prefix will not need to be used.

Do you have a Github repo for it so I can give you a PR?


Thanks for the comment, it is on github there:
github.com/Sirvoid/MindustryVCode
xyzzy529 May 30, 2021 @ 11:59pm 
Excellent VCode. :steamthumbsup: It really makes writing the Scripts easier.
I made some additions to change the Memory Cell usage to put the _retCount at 62-- instead of 0++ because many other Logic Scripts already use the Cell lower slots.
Also created a Comment line that gets put into the code as:
set_Comment "your comment here"
The comment makes the resulting code easier to read (and who doesn't like comments).
Also added a 'noend' tokenFunc so that the user can choose to end the Script with 'end' or drop off without it. There seems do be a difference in what gets cleared with and without an actual end.

Thinking about adding the script commands as Tokens so the 'cmd' prefix will not need to be used.

Do you have a Github repo for it so I can give you a PR?