colourise the terminal

This commit is contained in:
2023-03-08 19:04:53 +00:00
parent 11ed803601
commit f7603e30c4
18 changed files with 373 additions and 76 deletions

View File

@@ -4,7 +4,7 @@ import (
"strings"
)
var commentCompile = makeRegex("(.|\n)*//(.|\n)*")
var commentCompile = makeRegex("(.)*#(.)*")
func isComment(code UNPARSEcode) bool {
return commentCompile.MatchString(code.code)
@@ -15,11 +15,11 @@ func isBlank(code UNPARSEcode) bool {
}
func parseComment(code UNPARSEcode, index int, codelines []UNPARSEcode) (any, bool, ArErr) {
split := strings.Split(code.code, "//")
split := strings.Split(code.code, "#")
temp := []string{}
for i := 0; i < len(split)-1; i++ {
temp = append(temp, split[i])
joined := strings.Join(temp, "//")
joined := strings.Join(temp, "#")
resp, worked, _, _ := translateVal(UNPARSEcode{code: joined, realcode: code.realcode, line: code.line, path: code.path}, index, codelines, true)
if worked {
return resp, true, ArErr{}