mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
finish operators
This commit is contained in:
@@ -14,16 +14,18 @@ func isBlank(code UNPARSEcode) bool {
|
||||
return strings.TrimSpace(code.code) == ""
|
||||
}
|
||||
|
||||
func parseComment(code UNPARSEcode, index int, codelines []UNPARSEcode) (any, bool, ArErr) {
|
||||
func parseComment(code UNPARSEcode, index int, codelines []UNPARSEcode) (any, bool, ArErr, int) {
|
||||
split := strings.Split(code.code, "#")
|
||||
temp := []string{}
|
||||
step := 1
|
||||
for i := 0; i < len(split)-1; i++ {
|
||||
temp = append(temp, split[i])
|
||||
joined := strings.Join(temp, "#")
|
||||
resp, worked, _, _ := translateVal(UNPARSEcode{code: joined, realcode: code.realcode, line: code.line, path: code.path}, index, codelines, true)
|
||||
resp, worked, _, s := translateVal(UNPARSEcode{code: joined, realcode: code.realcode, line: code.line, path: code.path}, index, codelines, true)
|
||||
step += s - 1
|
||||
if worked {
|
||||
return resp, true, ArErr{}
|
||||
return resp, true, ArErr{}, step
|
||||
}
|
||||
}
|
||||
return nil, false, ArErr{"Syntax Error", "invalid comment", code.line, code.path, code.realcode, true}
|
||||
return nil, false, ArErr{"Syntax Error", "invalid comment", code.line, code.path, code.realcode, true}, step
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user