Crystal::Macros - Crystal 1.15.0

submited by
Style Pass
2025-01-11 03:00:02

You can invoke a fixed subset of methods on AST nodes at compile-time. These methods are documented on the classes in this module. Additionally, methods of the Macros module are top-level methods that you can invoke, like #puts and #run.

Returns whether a compile-time flag is set for the host platform, which can differ from the target platform (#flag?) during cross-compilation.

Parses type_name into a Path, Generic (also used for unions), ProcNotation, or Metaclass.

Same as #read_file, except that nil is returned on any I/O failure instead of issuing a compile-time failure.

Leave a Comment
Related Posts