From de84b80f2e1e150974984f49aa3213605933bb48 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sun, 17 Apr 2022 12:28:48 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20comment=20syntax,=20improve?= =?UTF-8?q?=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ideas-1.sh | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/ideas-1.sh b/ideas-1.sh index 9b80d65..d52af96 100644 --- a/ideas-1.sh +++ b/ideas-1.sh @@ -1,3 +1,20 @@ +## COMMENTS ## +# one-line comments (from prefix to EOL) +mov $a 42 # comment +mov $a 42 // comment +mov $a 42 ; comment + +# block comments +/* + Block comment +*/ + +/* Also a block comment */ + +mov /* Inline block comment */ $a 42 + + + ## VARIABLES ## # $2 => $1 mov|set $1 $2 @@ -5,7 +22,7 @@ mov|set $1 $2 # load $1 from root scope into current scope glob|global|pub|public $1 -# vartypes: +# vartypes null # null true|false # bool eg. -44 27 287634 # int @@ -58,16 +75,16 @@ ifl cond ifn cond # cond: -# x -# !x -# x == y -# x != y -# x === y -# x !== y -# x < y -# x <= y -# x > y -# x >= y +x +!x +x == y +x != y +x === y +x !== y +x < y +x <= y +x > y +x >= y