mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
fix catch error
This commit is contained in:
@@ -28,11 +28,10 @@ func parseTryCatch(code UNPARSEcode, index int, codelines []UNPARSEcode) (TryCat
|
|||||||
return TryCatch{}, false, err, i
|
return TryCatch{}, false, err, i
|
||||||
}
|
}
|
||||||
totalIndex += i
|
totalIndex += i
|
||||||
/*
|
|
||||||
if index+totalIndex >= len(codelines) {
|
if index+totalIndex >= len(codelines) {
|
||||||
return TryCatch{}, false, ArErr{"Syntax Error", "expected catch statement", code.line, code.path, code.realcode, true}, i
|
return TryCatch{}, false, ArErr{"Syntax Error", "expected catch statement", code.line, code.path, code.realcode, true}, i
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
catchtrimmed := strings.TrimSpace(codelines[index+totalIndex].code)
|
catchtrimmed := strings.TrimSpace(codelines[index+totalIndex].code)
|
||||||
if !catchCompiled.MatchString(catchtrimmed) {
|
if !catchCompiled.MatchString(catchtrimmed) {
|
||||||
return TryCatch{}, false, ArErr{"Syntax Error", "invalid syntax", code.line, code.path, code.realcode, true}, i
|
return TryCatch{}, false, ArErr{"Syntax Error", "invalid syntax", code.line, code.path, code.realcode, true}, i
|
||||||
|
|||||||
Reference in New Issue
Block a user