| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| cppsp_compiler.exe | 2026-02-07 | 1.3 MB | |
| cppsp_compiler.cpp | 2026-02-07 | 65.4 kB | |
| cppsp_compiler_mac.delete_mac | 2026-02-07 | 240.6 kB | |
| cppsp_compiler_linux.delete_linux | 2026-02-07 | 2.1 MB | |
| cppsp v1.4.5 - @custom_ a transpile-time pattern-driven code generator with nested templates, namespace-scoped features source code.tar.gz | 2026-02-07 | 2.7 MB | |
| cppsp v1.4.5 - @custom_ a transpile-time pattern-driven code generator with nested templates, namespace-scoped features source code.zip | 2026-02-07 | 2.7 MB | |
| cppsp v1.4.5 - @custom_ Like c_c++ Macros, but Safer and Namespaced! source code.tar.gz | 2026-02-07 | 2.7 MB | |
| cppsp v1.4.5 - @custom_ Like c_c++ Macros, but Safer and Namespaced! source code.zip | 2026-02-07 | 2.7 MB | |
| README.md | 2026-02-07 | 1.7 kB | |
| Totals: 9 Items | 14.5 MB | 3 | |
-
@custom xxx("...",<{...}>,...): @custom can let users write own syntaxs. it is a transpile-time pattern-driven code generator with nested templates, namespace-scoped features "..." can generate code, <{...}> is similar to it but will become a placeholder and replaced by parameter when the custom syntax is called. Code will generate in global and the inner of some cppsp keywords. namespace only accept one level like:namespace n{ @custom.... }import iostream,vector @function<< class B{int aa;};>> namespace fromcpp{ @custom tem("template<typename T> ") struct T
//use struct to declare a type } //c++ Generics fromcpp.tem() function add(T a,T b) T{return a+b} //Generics with c++ template @custom cs("< ",<{T}>," >") print(add cs(int) (1,2) ) add cs(int) (1,2)//use cppsp template to generate STL container @custom vec("std::vector<",<{T}>,"> ") @custom decl(<{name}>,";") @custom def(<{name}>,"=",<{value}>,";") vec(int) ;decl(a) vec(vec(char)); def(b,{{'a','b','c','d','e'}}) //cppsp way to use Generics @custom subs(<{T}>," sub(",<{T a}>,",",<{T b}>,")"," {return a-b;}") subs(int ,int a,int b) function [sub] print("\n",sub(3,4)) @custom class("class ",<{T}>,"{",<{body}>,"};") class(obja,var a int var s,ss string var f float
) @custom auto("auto ",<{name}>," = [",<{cap}>,"]","(",<{param}>,")","{",<{body}>,";};") if(true){ auto(x,&,int a,return a+1) function [x] print("\n auto:",x(9)) }