-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing/nice to have info about Macros #55
Comments
Add an example for working with macros and generics macro @test_list(a)
{
var $Type = $typeof(a);
$if $defined(a[0]) &&& $Type.typeid == List(<$typeof(a[0])>).typeid:
$echo("LIIIIST");
$else
$echo("NOT LIST");
$endif
} |
macro @example(t_slice)
{
var $type = $typeof(t_slice);
}
This is not an error macro @example(t_slice)
{
var $Type = $typeof(t_slice);
} from: c3lang/c3c#1553 |
Another thing I ran into:
Fails to compile and places the error at the
The difference between the different types of macro parameters should probably be mentioned:
Edit: Nevermind, it's in there, but half a page down. Looking at it, maybe we should split macros into the "differences between C" and the actual macro system info. |
I would like to slowly compose a list of stuff that I bump into while playing around with macros, so we can later on improve the docs.
Working with
$typeof
$typeof
, currently it's listed on top of the reflection page. The documentation for$typeof
should ideally mention that the attributes are at the top.nameof
missing from the attributesWorking with
$membersof
.get
should be mentioned in the docsThe text was updated successfully, but these errors were encountered: