Created
May 24, 2021 22:39
-
-
Save abcarroll/1b23913d91529abbdd795fc547c1605c to your computer and use it in GitHub Desktop.
Example VmScript/JSON Unit (WIP)
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
{ | |
"units": [ | |
{ | |
"name": "test", | |
"fn": [ | |
{ | |
"name": "main", | |
"param": [ | |
{ | |
"type": { | |
"name": "int" | |
}, | |
"name": "argc" | |
}, | |
{ | |
"type": { | |
"name": "array", | |
"type": "str" | |
}, | |
"name": "argv" | |
} | |
], | |
"body": [ | |
{ | |
"printf": [ | |
{ | |
"const": { | |
"type": "str", | |
"value": "passed parameters: %i" | |
} | |
}, | |
{ | |
"value": { | |
"ref": "argc" | |
} | |
} | |
] | |
}, | |
{ | |
"return": [ | |
{ | |
"const": { | |
"type": "int", | |
"value": "1" | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment