Skip to content

Commit

Permalink
Change nop to skip
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Jun 22, 2022
1 parent c146143 commit 6d261c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/FSM/LangParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ parseCase = do
return $ SCase e (cs ++ [(TH.WildP, SNop)])

parseNop :: Parser (Stmt LvlSugared)
parseNop = singleSymbol "nop" *> return SNop
parseNop = singleSymbol "skip" *> return SNop

parseContinue :: Parser (Stmt LvlSugared)
parseContinue = singleSymbol "continue" >> return (SBreak BrkCont)
Expand Down
2 changes: 1 addition & 1 deletion src/FSM/LangPretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ prettyFun fs s = vcat $ map f (M.toList fs) ++ [prettyStmt s]
where f (n, (p, s')) = vcat [prettyKeyword "fun" <+> TH.ppr n <+> TH.ppr p <> prettyKeyword ":", nest 4 $ prettyStmt s']

prettyStmt :: Stmt l -> Doc
prettyStmt SNop = prettyKeyword "nop"
prettyStmt SNop = prettyKeyword "skip"
prettyStmt (SLet t n vs s) = vcat [prettyKeyword (kw t) <+> TH.ppr n <+> prettyKeyword "=" <+> prettyVStmt vs, prettyStmt s]
where
kw VarLet = "let"
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ fun f i:
| True:
yield i
| False:
nop
skip
yield i
ret call f (i+1)
ret call f 0
Expand Down

0 comments on commit 6d261c1

Please sign in to comment.