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:
2026-01-24 18:35:43 +00:00
parent 8f1d13a86b
commit fdd61cc90c
118 changed files with 315687 additions and 6 deletions
+31
View File
@@ -0,0 +1,31 @@
// retoor <retoor@molodetz.nl>
import "jinja" for Environment, DictLoader
var env = Environment.new(DictLoader.new({
"basic": "{\% for item in items \%}{{ item }}{\% endfor \%}",
"with_sep": "{\% for item in items \%}{{ item }}{\% if not loop.last \%}, {\% endif \%}{\% endfor \%}",
"index": "{\% for item in items \%}{{ loop.index }}:{{ item }}{\% if not loop.last \%} {\% endif \%}{\% endfor \%}",
"index0": "{\% for item in items \%}{{ loop.index0 }}:{{ item }}{\% if not loop.last \%} {\% endif \%}{\% endfor \%}",
"first_last": "{\% for item in items \%}{\% if loop.first \%}[{\% endif \%}{{ item }}{\% if loop.last \%}]{\% endif \%}{\% endfor \%}",
"length": "{\% for item in items \%}{{ loop.length }}{\% endfor \%}",
"else_empty": "{\% for item in items \%}{{ item }}{\% else \%}empty{\% endfor \%}",
"nested": "{\% for row in matrix \%}{\% for col in row \%}{{ col }}{\% endfor \%};{\% endfor \%}",
"dict": "{\% for key, value in data \%}{{ key }}={{ value }}{\% if not loop.last \%} {\% endif \%}{\% endfor \%}",
"range": "{\% for i in range(3) \%}{{ i }}{\% endfor \%}",
"range_start": "{\% for i in range(1, 4) \%}{{ i }}{\% endfor \%}",
"string": "{\% for c in text \%}{{ c }}-{\% endfor \%}"
}))
System.print(env.getTemplate("basic").render({"items": ["a", "b", "c"]})) // expect: abc
System.print(env.getTemplate("with_sep").render({"items": ["a", "b", "c"]})) // expect: a, b, c
System.print(env.getTemplate("index").render({"items": ["a", "b"]})) // expect: 1:a 2:b
System.print(env.getTemplate("index0").render({"items": ["a", "b"]})) // expect: 0:a 1:b
System.print(env.getTemplate("first_last").render({"items": ["a", "b", "c"]})) // expect: [abc]
System.print(env.getTemplate("length").render({"items": ["a", "b", "c"]})) // expect: 333
System.print(env.getTemplate("else_empty").render({"items": []})) // expect: empty
System.print(env.getTemplate("nested").render({"matrix": [[1, 2], [3, 4]]})) // expect: 12;34;
System.print(env.getTemplate("dict").render({"data": {"b": 2}})) // expect: b=2
System.print(env.getTemplate("range").render({})) // expect: 012
System.print(env.getTemplate("range_start").render({})) // expect: 123
System.print(env.getTemplate("string").render({"text": "hi"})) // expect: h-i-