Support for $assert. Also change order of checking global declarations from parsing to semantic analysis.

This commit is contained in:
Christoffer Lerno
2020-07-30 17:43:12 +02:00
committed by Christoffer Lerno
parent 8586bf3f8d
commit 380c1c8ab4
19 changed files with 201 additions and 12 deletions

View File

@@ -1215,6 +1215,18 @@ public func int! decode(char[] infile, byte[] out)
return j;
}
*/
int xx = 0;
const int FOOP = 2;
$assert(xx == 0);
func void test22()
{
$assert(FOOP == 2, "Bad");
$assert(FOOP == 0, "Good");
}
func int main(int x)
{