Skip to content

Commit

Permalink
Removed deprecated "parent" keyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoblenz committed Dec 10, 2019
1 parent 1bca2a5 commit a99b800
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/main/scala/edu/cmu/cs/obsidian/lexer/Lexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ object Lexer extends RegexParsers {
case "true" => TrueT()
case "false" => FalseT()
case "this" => ThisT()
case "parent" => ParentT()
case "import" => ImportT()
case "remote" => RemoteT()
case "ensures" => EnsuresT()
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/edu/cmu/cs/obsidian/lexer/Token.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ case class BoolT() extends Token { override def toString: String = "bool"}
case class TrueT() extends Token { override def toString: String = "true"}
case class FalseT() extends Token { override def toString: String = "false"}
case class ThisT() extends Token { override def toString: String = "this"}
case class ParentT() extends Token { override def toString: String = "parent"}
case class ImportT() extends Token { override def toString: String = "import"}
case class RemoteT() extends Token { override def toString: String = "remote"}
case class EnsuresT() extends Token { override def toString: String = "ensures"}
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/edu/cmu/cs/obsidian/parser/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,11 @@ object Parser extends Parsers {
parseTrue | parseFalse | parseNumLiteral | parseStringLiteral

val parseThis = { ThisT() ^^ (t => This().setLoc(t))}
val parseParent = { ParentT() ^^ (p => Parent().setLoc(p))}

val fail = failure("expression expected")

val simpleExpr: Parser[Expression] =
parseThis | parseParent | parseNew | parseLocalInv |
parseThis | parseNew | parseLocalInv |
parseLiterals | parseStateInitializer | parseVar | parenExpr | fail

simpleExpr ~ parseDots ^^ { case e ~ applyDots => applyDots(e) }
Expand Down

0 comments on commit a99b800

Please sign in to comment.