Skip to content

Commit

Permalink
Fix lexeme wtf
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Jan 8, 2024
1 parent 5bc2f0c commit 225d828
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lvtc/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Expression (parseExpresion, parseAllExpression)
import Parser (runParser)
import Alias (proceedAlias)
import ParseLvt (parseInstruction, parseInstructions, parseFuncDeclaration)
import ParseLvt (parseInstruction, parseInstructions)
import WatLike (aSTToWatLike)
import AST

Expand Down
2 changes: 1 addition & 1 deletion lvtc/src/ParseLvt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ parseFunction :: Parser Instruction
parseFunction = parseCall

parseReturn :: Parser Instruction
parseReturn = Return <$> ((parseString "<- " <|> parseString "<-") *> parseValue)
parseReturn = Return <$> ((parseString "<-") *> parseValue)

parseType :: Parser String
parseType =
Expand Down
4 changes: 2 additions & 2 deletions lvtc/test/UTParseLvt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ utParserLvt = testGroup "Parse Lvt"
""
(Function ("a", [Integer 0, StringView "abc", Boolean False]))
, testCase "return value" $
testParserHelper "<- 0;\n"
testParserHelpers "<- 0;\n"
""
(Return (Integer 0))
[(Return (Integer 0))]
, testCase "condition if" $
testParserHelper "if (a)\n{\nb(0);\n};\n"
""
Expand Down

0 comments on commit 225d828

Please sign in to comment.