Move how the template language is written into internal/grammar

This commit is contained in:
2026-10-05 12:11:36 +02:00
committed by Lillem4n
parent 41292f9d89
commit c2f2e86735
21 changed files with 903 additions and 853 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"unicode"
"github.com/larvit/fejkdata/internal/drawstate"
"github.com/larvit/fejkdata/internal/grammar"
)
// transforms are the builtins that rewrite one operand's value; they nest, so
@@ -30,7 +31,7 @@ func withTransforms(calls map[string]builtin) map[string]builtin {
// field it finally names and the transforms to apply, innermost last.
func unwrapTransform(arg string) (leaf string, chain []func(string) string, err error) {
for {
name, args, isCall := funcCall(arg)
name, args, isCall := grammar.FuncCall(arg)
if !isCall {
return arg, chain, nil
}