diff --git a/src/Juvix/Compiler/Tree/Keywords.hs b/src/Juvix/Compiler/Tree/Keywords.hs index 1c17f29ec3..a9a8b1fddb 100644 --- a/src/Juvix/Compiler/Tree/Keywords.hs +++ b/src/Juvix/Compiler/Tree/Keywords.hs @@ -12,6 +12,7 @@ import Juvix.Data.Keyword.All kwAnomaDecode, kwAnomaEncode, kwAnomaGet, + kwAnomaVerifyDetached, kwArgsNum, kwAtoi, kwBr, @@ -78,6 +79,7 @@ allKeywords = kwAnomaGet, kwAnomaDecode, kwAnomaEncode, + kwAnomaVerifyDetached, kwPoseidon, kwEcOp, kwRandomEcPoint diff --git a/src/Juvix/Compiler/Tree/Translation/FromSource.hs b/src/Juvix/Compiler/Tree/Translation/FromSource.hs index 12fd4ad16f..5b51020047 100644 --- a/src/Juvix/Compiler/Tree/Translation/FromSource.hs +++ b/src/Juvix/Compiler/Tree/Translation/FromSource.hs @@ -126,6 +126,7 @@ parseAnoma = parseAnoma' kwAnomaGet OpAnomaGet <|> parseAnoma' kwAnomaDecode OpAnomaDecode <|> parseAnoma' kwAnomaEncode OpAnomaEncode + <|> parseAnoma' kwAnomaVerifyDetached OpAnomaVerifyDetached parseAnoma' :: (Members '[Reader ParserSig, InfoTableBuilder, State LocalParams] r) => diff --git a/src/Juvix/Data/Keyword/All.hs b/src/Juvix/Data/Keyword/All.hs index 60d4da5911..d35f4c11d8 100644 --- a/src/Juvix/Data/Keyword/All.hs +++ b/src/Juvix/Data/Keyword/All.hs @@ -6,6 +6,7 @@ where import Juvix.Data.Keyword import Juvix.Extra.Strings qualified as Str +import Juvix.Extra.Strings qualified as Std kwAs :: Keyword kwAs = asciiKw Str.as @@ -451,6 +452,9 @@ kwAnomaDecode = asciiKw Str.anomaDecode kwAnomaEncode :: Keyword kwAnomaEncode = asciiKw Str.anomaEncode +kwAnomaVerifyDetached :: Keyword +kwAnomaVerifyDetached = asciiKw Std.anomaVerifyDetached + delimBraceL :: Keyword delimBraceL = mkDelim Str.braceL diff --git a/test/Tree/Transformation/CheckNoAnoma.hs b/test/Tree/Transformation/CheckNoAnoma.hs index 0a49eb57fb..5ff89bd83f 100644 --- a/test/Tree/Transformation/CheckNoAnoma.hs +++ b/test/Tree/Transformation/CheckNoAnoma.hs @@ -71,5 +71,9 @@ tests = Eval.NegTest "anomaEncode" $(mkRelDir ".") - $(mkRelFile "test011.jvt") + $(mkRelFile "test011.jvt"), + Eval.NegTest + "anomaVerifyDetached" + $(mkRelDir ".") + $(mkRelFile "test012.jvt") ] diff --git a/tests/Tree/negative/test012.jvt b/tests/Tree/negative/test012.jvt new file mode 100644 index 0000000000..11005acf5a --- /dev/null +++ b/tests/Tree/negative/test012.jvt @@ -0,0 +1,5 @@ +-- calling unsupported anoma-verify-detached + +function main() : * { + anoma-verify-detached(1,2,3) +}