Fix parsing of LDVR/STVR

This commit is contained in:
Joscha 2019-11-10 11:33:29 +00:00
parent 4a67848627
commit cd5ff1e105

View file

@ -27,6 +27,8 @@ parseByLiteral = foldl (<|>) empty . map (\(a, b) -> b <$ C.string' a)
smallOpcode' :: Parser SmallOpcode smallOpcode' :: Parser SmallOpcode
smallOpcode' = parseByLiteral smallOpcode' = parseByLiteral
[ ( "LDC", LDC) [ ( "LDC", LDC)
, ("LDVR", LDVR) -- Needs to be before LDV
, ("STVR", STVR) -- Needs to be before STV
, ( "LDV", LDV) , ( "LDV", LDV)
, ( "STV", STV) , ( "STV", STV)
, ( "ADD", ADD) , ( "ADD", ADD)
@ -39,8 +41,6 @@ smallOpcode' = parseByLiteral
, ("LDIV", LDIV) , ("LDIV", LDIV)
, ("STIV", STIV) , ("STIV", STIV)
, ("CALL", CALL) , ("CALL", CALL)
, ("LDVR", LDVR)
, ("STVR", STVR)
] ]
largeOpcode' :: Parser LargeOpcode largeOpcode' :: Parser LargeOpcode