mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
colourise the terminal
This commit is contained in:
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user