mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Support for $assert. Also change order of checking global declarations from parsing to semantic analysis.
This commit is contained in:
committed by
Christoffer Lerno
parent
8586bf3f8d
commit
380c1c8ab4
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user