Go to Katenary V3

This is the next-gen of Katenary
This commit is contained in:
2023-12-06 15:24:02 +01:00
parent c37bde487b
commit 475a025d9e
132 changed files with 6410 additions and 4621 deletions

19
generator/globals.go Normal file
View File

@@ -0,0 +1,19 @@
package generator
import "regexp"
var (
// regexp to all tpl strings
tplValueRegexp = regexp.MustCompile(`\{\{.*\}\}-`)
// find all labels starting by __replace_ and ending with ":"
// and get the value between the quotes
// ?s => multiline
// (?P<inc>.+?) => named capture group to "inc" variable (so we could use $inc in the replace)
replaceLabelRegexp = regexp.MustCompile(`(?s)__replace_.+?: '(?P<inc>.+?)'`)
// Standard annotationss
Annotations = map[string]string{
KATENARY_PREFIX + "version": Version,
}
)