mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
fix incorrect order of translation
This commit is contained in:
@@ -55,7 +55,9 @@ func translateVal(code UNPARSEcode, index int, codelines []UNPARSEcode, isLine i
|
||||
isLine = 1
|
||||
}
|
||||
|
||||
if isBrackets(code) {
|
||||
if isBoolean(code) {
|
||||
return parseBoolean(code)
|
||||
} else if isBrackets(code) {
|
||||
resp, worked, err, i = parseBrackets(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
@@ -74,6 +76,35 @@ func translateVal(code UNPARSEcode, index int, codelines []UNPARSEcode, isLine i
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
} else if isNumber(code) {
|
||||
return parseNumber(code)
|
||||
} else if isNegative(code) {
|
||||
return parseNegative(code, index, codelines)
|
||||
} else if isString(code) {
|
||||
return parseString(code)
|
||||
} else if issquareroot(code) {
|
||||
return parseSquareroot(code, index, codelines)
|
||||
} else if isFactorial(code) {
|
||||
return parseFactorial(code, index, codelines)
|
||||
} else if isCall(code) {
|
||||
resp, worked, err, i = parseCall(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
} else if isVariable(code) {
|
||||
return parseVariable(code)
|
||||
} else if isArray(code) {
|
||||
resp, worked, err, i = parseArray(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
} else if isMapGet(code) {
|
||||
return mapGetParse(code, index, codelines)
|
||||
} else if isIndexGet(code) {
|
||||
resp, worked, err, i = indexGetParse(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
}
|
||||
{
|
||||
operation, worked, err, step := parseOperations(code, index, codelines)
|
||||
@@ -83,41 +114,6 @@ func translateVal(code UNPARSEcode, index int, codelines []UNPARSEcode, isLine i
|
||||
return nil, worked, err, step
|
||||
}
|
||||
}
|
||||
if isNumber(code) {
|
||||
return parseNumber(code)
|
||||
} else if isNegative(code) {
|
||||
return parseNegative(code, index, codelines)
|
||||
} else if isFactorial(code) {
|
||||
return parseFactorial(code, index, codelines)
|
||||
} else if isCall(code) {
|
||||
resp, worked, err, i = parseCall(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
}
|
||||
if isBoolean(code) {
|
||||
return parseBoolean(code)
|
||||
} else if isVariable(code) {
|
||||
return parseVariable(code)
|
||||
} else if isArray(code) {
|
||||
resp, worked, err, i = parseArray(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
}
|
||||
if isMapGet(code) {
|
||||
return mapGetParse(code, index, codelines)
|
||||
} else if isIndexGet(code) {
|
||||
resp, worked, err, i = indexGetParse(code, index, codelines)
|
||||
if worked {
|
||||
return resp, worked, err, i
|
||||
}
|
||||
}
|
||||
if isString(code) {
|
||||
return parseString(code)
|
||||
} else if issquareroot(code) {
|
||||
return parseSquareroot(code, index, codelines)
|
||||
}
|
||||
return resp, worked, err, i
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user