Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Metaprogramming/Zkl/metaprogramming-1.zkl
Normal file
3
Task/Metaprogramming/Zkl/metaprogramming-1.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#define name [0|1]
|
||||
#if [0|1|name]
|
||||
#else, #endif
|
||||
3
Task/Metaprogramming/Zkl/metaprogramming-2.zkl
Normal file
3
Task/Metaprogramming/Zkl/metaprogramming-2.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
//Full zkl functionality but limited access to the parse stream; only #defines
|
||||
#ifdef name
|
||||
#fcn name {code}
|
||||
3
Task/Metaprogramming/Zkl/metaprogramming-3.zkl
Normal file
3
Task/Metaprogramming/Zkl/metaprogramming-3.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// Shove text into the parse stream
|
||||
#text name text
|
||||
#tokenize name, #tokenize f, #tokenize f(a)
|
||||
3
Task/Metaprogramming/Zkl/metaprogramming-4.zkl
Normal file
3
Task/Metaprogramming/Zkl/metaprogramming-4.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#<<<#
|
||||
text, any text, inside #<<<# pairs is ignored
|
||||
#<<<#
|
||||
8
Task/Metaprogramming/Zkl/metaprogramming-5.zkl
Normal file
8
Task/Metaprogramming/Zkl/metaprogramming-5.zkl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
string:=
|
||||
#<<<
|
||||
"here docs:
|
||||
all text in #<<< pairs is collected into one [long] line and passed
|
||||
verbatim to the tokenizer. Illustrated here as quoted (\") strings
|
||||
can not span lines.";
|
||||
#<<<
|
||||
println(string); // contains newlines
|
||||
4
Task/Metaprogramming/Zkl/metaprogramming-6.zkl
Normal file
4
Task/Metaprogramming/Zkl/metaprogramming-6.zkl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const{ var _n=-1; var [proxy] N=fcn{ _n+=1 } }
|
||||
const X=N; // → 0
|
||||
println(_n); // → 2 code time is after const time
|
||||
const Y=N,Z=N; // → 1,2
|
||||
Loading…
Add table
Add a link
Reference in a new issue