add colour object

This commit is contained in:
2023-06-19 23:58:34 +01:00
parent 3f048ce645
commit 3bf48079d5
9 changed files with 370 additions and 42 deletions

View File

@@ -6,7 +6,7 @@ import (
"sync"
)
var mapCompiled = makeRegex(`( )*<( |\n)*(((.|\n)+)(,(.|\n)+)*)?( |\n)*>( )*`)
var mapCompiled = makeRegex(`( )*{( |\n)*(((.|\n)+)(,(.|\n)+)*)?( |\n)*}( )*`)
type createMap struct {
body anymap
@@ -20,7 +20,7 @@ func isMap(code UNPARSEcode) bool {
}
func parseMap(code UNPARSEcode, index int, codelines []UNPARSEcode) (any, bool, ArErr, int) {
trimmed := strings.Trim(code.code, " ")
trimmed := strings.TrimSpace(code.code)
trimmed = trimmed[1 : len(trimmed)-1]
debugPrintln(trimmed)
return Map(anymap{}), true, ArErr{}, 1