diff --git a/src/import.go b/src/import.go index f3f4e59..4a2557e 100644 --- a/src/import.go +++ b/src/import.go @@ -156,6 +156,7 @@ func translateImport(realpath string, origin string, topLevelOnly bool) (transla importing[p] = true translated, translationerr := translate(codelines) + debugPrintln(translated...) importing[p] = false if translationerr.EXISTS { diff --git a/src/translate.go b/src/translate.go index a295bb5..bd37a9b 100644 --- a/src/translate.go +++ b/src/translate.go @@ -139,6 +139,9 @@ func translateVal(code UNPARSEcode, index int, codelines []UNPARSEcode, isLine i return nil, worked, err, step } } + if isNegative(code) { + return parseNegative(code, index, codelines) + } if !QuickKnownFailures["call"+code.code] && isCall(code) { resp, worked, err, i = parseCall(code, index, codelines) if worked { @@ -146,9 +149,7 @@ func translateVal(code UNPARSEcode, index int, codelines []UNPARSEcode, isLine i } QuickKnownFailures["call"+code.code] = true } - if isNegative(code) { - return parseNegative(code, index, codelines) - } else if isMapGet(code) { + if isMapGet(code) { return mapGetParse(code, index, codelines) } else if !QuickKnownFailures["indexget"+code.code] && isIndexGet(code) { resp, worked, err, i = indexGetParse(code, index, codelines)