Skip to content

Commit

Permalink
Remove the obsolete breathe keyword (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasWrigstad authored and albertnetymk committed Jun 13, 2016
1 parent 44180bc commit 4d35688
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 28 deletions.
5 changes: 0 additions & 5 deletions src/back/CodeGen/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ translateDecl (name, expr) = do
instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
-- | Translate an expression into the corresponding C code
translate skip@(A.Skip {}) = namedTmpVar "skip" (A.getType skip) (AsExpr unit)
translate breathe@(A.Breathe {}) =
namedTmpVar "breathe"
(A.getType breathe)
(Call (Nam "call_respond_with_current_scheduler") ([] :: [CCode Expr]))

translate null@(A.Null {}) = namedTmpVar "literal" (A.getType null) Null
translate true@(A.BTrue {}) = namedTmpVar "literal" (A.getType true) (Embed "1/*True*/"::CCode Expr)
translate false@(A.BFalse {}) = namedTmpVar "literal" (A.getType false) (Embed "0/*False*/"::CCode Expr)
Expand Down
1 change: 0 additions & 1 deletion src/ir/AST/PrettyPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ ppSugared e = case getSugared e of

ppExpr :: Expr -> Doc
ppExpr Skip {} = "()"
ppExpr Breathe {} = "breathe"
ppExpr MethodCall {target, name, args} =
maybeParens target <> "." <> ppName name <>
parens (commaSep (map ppExpr args))
Expand Down
5 changes: 0 additions & 5 deletions src/parser/Parser/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ lexer =
,"class"
,"def"
,"stream"
,"breathe"
,"int"
,"string"
,"char"
Expand Down Expand Up @@ -633,7 +632,6 @@ highOrderExpr = adtExpr

expr :: Parser Expr
expr = unit
<|> breathe
<|> try embed
<|> try path
<|> try functionCall
Expand Down Expand Up @@ -686,9 +684,6 @@ expr = unit
unit = do pos <- getPosition
reservedOp "()"
return $ Skip (meta pos)
breathe = do pos <- getPosition
reserved "breathe"
return $ Breathe (meta pos)
path = do pos <- getPosition
root <- parens expression <|> try functionCall <|> varAccess <|> stringLit
first <- pathComponent
Expand Down
10 changes: 0 additions & 10 deletions src/tests/encore/basic/breathe.enc

This file was deleted.

2 changes: 0 additions & 2 deletions src/tests/encore/basic/breathe.out

This file was deleted.

5 changes: 0 additions & 5 deletions src/types/Typechecker/Typechecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,6 @@ instance Checkable Expr where
-- E |- () : void
doTypecheck skip@(Skip {}) = return $ setType voidType skip

--
-- ----------------
-- E |- breathe : void
doTypecheck breathe@(Breathe {}) = return $ setType voidType breathe

--- |- t
-- E |- body : t
-- ----------------------
Expand Down

0 comments on commit 4d35688

Please sign in to comment.