LeMP Macro Reference Manual
20 Mar 2016Look up by category
- Code generation & macro replacement
definereplace(see article)##unroll(see article); the olderunrollis obsolete- Algebraic Data Types (see article)
- Argument list processing
- Compile-time decision making and code execution
compileTime,compileTimeAndRuntime(andrawCompileTime)precompute,rawPrecompute##switchstatic matchCodestatic ifandstatic_if`staticMatches`operatorstatic deconstructandstatic tryDeconstruct
- Syntax tree generation (at runtime)
- Pattern matching (at runtime)
matchCode: Syntax tree matching (see article)match: Object pattern matching (obsolete) (see article)
- Code Contracts
- Fine-grained features
assert- Backing fields
- Get-or-create-member (article)
- Tuples (see article)
concatIdand$(out ...)thisconstructors- Easy method forwarding
inand in-range operator combinationsincludeFileincludeFileBinaryincludeFileTextnamespacewithout braces??=and:=saveAndRestorestringify@@symbols(#useSymbols)#useSequenceExpressionsand#ecs#lines- multi-using
- Built-in macros
#importMacros,#set,#snippet,#get,noMacro,#printKnownMacros#preprocessArgsOf,#preprocessChild,#statement
- LLLPG
How to write your own macros? TODO - ask me how