feat: added tool setting the mod dir.

This commit is contained in:
Andrey Parhomenko 2024-06-09 17:51:45 +05:00
parent 7e14b1d212
commit e3d61d819f
2 changed files with 12 additions and 13 deletions

View file

@ -43,7 +43,7 @@ func (pp *Preprocessor) Process(
} }
} }
preCode = data[len(pref):idxEnd] preCode = data[len(pref):idxEnd]
texts = append(texts, []byte{}) //texts = append(texts, []byte{})
data = data[idxEnd+len(pp.tags[1]):] data = data[idxEnd+len(pp.tags[1]):]
} }
for { for {

View file

@ -1,18 +1,17 @@
{{ {{#
os := import("os") os := import("os")
shit := import("./tests/shit.tengo") shit := import("./tests/shit.tengo")
newVar := "'this is gen shita'" newVar := "'this is gen shita'"
pp.println(shit.some_func()) }}
}}# The index testing Text 0
1 + 1 = {{ pp.print(1+1) }} {{
cock {{ pp.print(newVar, "and cock") }} pp.println("Code 0")
}}
## The shit after Text 1
{{
checking {{ pp.printf(newVar) }} pp.println("Code 1")
}}
## File contents Text 2
{{ {{
bts := os.read_file("tests/somefile") bts := os.read_file("tests/somefile")
pp.printf("%v\n%s", bts, bts) pp.printf("%v\n%s", bts, bts)