mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
25 lines
377 B
Plaintext
25 lines
377 B
Plaintext
macro int cofefe(#a)
|
|
{
|
|
int y = 0;
|
|
return #a + #a;
|
|
}
|
|
|
|
int abc = 1;
|
|
|
|
public func int xx()
|
|
{
|
|
abc++;
|
|
return abc;
|
|
}
|
|
|
|
public func void main()
|
|
{
|
|
define $x = 0;
|
|
int x = 0;
|
|
@cofefe(x += 1);
|
|
@cofefe(xx());
|
|
@cofefe($x += 1); // #error: Cannot modify '$x' inside of a runtime scope.
|
|
@cofefe(y += 1); // #error: Identifier 'y' could not be found.
|
|
}
|
|
|