From 0c40bca60b343bb289f0a567ec9ec9e9382bad2a Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 2 Dec 2024 13:57:03 +0100 Subject: Add array assignment to the IR --- lib/Language/Elna/Frontend/Parser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Language/Elna/Frontend/Parser.hs') diff --git a/lib/Language/Elna/Frontend/Parser.hs b/lib/Language/Elna/Frontend/Parser.hs index 570c91f..4878b28 100644 --- a/lib/Language/Elna/Frontend/Parser.hs +++ b/lib/Language/Elna/Frontend/Parser.hs @@ -93,10 +93,10 @@ expressionP :: Parser Expression expressionP = makeExprParser termP operatorTable variableAccessP :: Parser VariableAccess -variableAccessP = VariableAccess <$> identifierP {- do +variableAccessP = do identifier <- identifierP indices <- many $ bracketsP expressionP - pure $ foldr (flip ArrayAccess) (VariableAccess identifier) indices -} + pure $ foldr (flip ArrayAccess) (VariableAccess identifier) indices conditionP :: Parser Condition conditionP = do -- cgit v1.2.3