feat: add cJSON and SQLite amalgamation source files under deps/
Add the cJSON library (cJSON.c, cJSON.h) and SQLite amalgamation (sqlite3.c, sqlite3.h, sqlite3ext.h, shell.c) as vendored dependencies in the deps/ directory for use by the project build system.
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "jinja" for Environment, DictLoader
|
||||
|
||||
var env = Environment.new(DictLoader.new({
|
||||
"simple": "{\% macro greet(name) \%}Hello {{ name }}!{\% endmacro \%}{{ greet(\"World\") }}",
|
||||
"with_default": "{\% macro greet(name, greeting=\"Hi\") \%}{{ greeting }} {{ name }}!{\% endmacro \%}{{ greet(\"Bob\") }}",
|
||||
"multiple_calls": "{\% macro item(x) \%}[{{ x }}]{\% endmacro \%}{{ item(1) }}{{ item(2) }}{{ item(3) }}",
|
||||
"with_loop": "{\% macro items(list) \%}{\% for i in list \%}{{ i }}{\% endfor \%}{\% endmacro \%}{{ items([1, 2, 3]) }}"
|
||||
}))
|
||||
|
||||
System.print(env.getTemplate("simple").render({})) // expect: Hello World!
|
||||
System.print(env.getTemplate("with_default").render({})) // expect: Hi Bob!
|
||||
System.print(env.getTemplate("multiple_calls").render({})) // expect: [1][2][3]
|
||||
System.print(env.getTemplate("with_loop").render({})) // expect: 123
|
||||
Reference in New Issue
Block a user