Skip to content

Commit 503b7d6

Browse files
committed
While at it, also drop fun
1 parent 13755a5 commit 503b7d6

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

effekt/shared/src/main/scala/effekt/Lexer.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ enum TokenKind {
127127
case `with`
128128
case `case`
129129
case `do`
130-
case `fun`
131130
case `match`
132131
case `def`
133132
case `module`
@@ -175,7 +174,7 @@ object TokenKind {
175174

176175
val keywords = Vector(
177176
`let`, `true`, `false`, `val`, `var`, `if`, `else`, `while`, `type`, `effect`, `interface`,
178-
`try`, `with`, `case`, `do`, `fun`, `match`, `def`, `module`, `import`, `export`, `extern`,
177+
`try`, `with`, `case`, `do`, `match`, `def`, `module`, `import`, `export`, `extern`,
179178
`include`, `record`, `box`, `return`, `region`, `resource`, `new`, `and`, `is`,
180179
`namespace`, `pure`
181180
)

effekt/shared/src/main/scala/effekt/Parser.scala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ class Parser(positions: Positions, tokens: Seq[Token], source: Source) {
392392
some(ident, `/`).mkString("/") labelled "module name"
393393

394394
def isToplevel: Boolean = documentedKind match {
395-
case `val` | `fun` | `def` | `type` | `effect` | `namespace` |
395+
case `val` | `def` | `type` | `effect` | `namespace` |
396396
`extern` | `interface` | `type` | `record` | `var` => true
397397
case _ => false
398398
}
@@ -835,12 +835,6 @@ class Parser(positions: Positions, tokens: Seq[Token], source: Source) {
835835
Box(captures, expr, span())
836836
}
837837

838-
// TODO deprecate
839-
def funExpr(): Term =
840-
nonterminal:
841-
val blockLiteral = `fun` ~> BlockLiteral(Nil, valueParams().unspan, Nil, braces { stmts() }, span())
842-
Box(Maybe.None(Span(source, pos(), pos(), Synthesized)), blockLiteral, blockLiteral.span.synthesized)
843-
844838
def newExpr(): Term =
845839
nonterminal:
846840
New(`new` ~> implementation(), span())
@@ -1155,7 +1149,6 @@ class Parser(positions: Positions, tokens: Seq[Token], source: Source) {
11551149
case `try` => tryExpr()
11561150
case `region` => regionExpr()
11571151
case `box` => boxExpr()
1158-
case `fun` => funExpr()
11591152
case `new` => newExpr()
11601153
case `do` => doExpr()
11611154
case _ if isString => templateString()

effekt/shared/src/main/scala/effekt/core/Parser.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class EffektLexers(positions: Positions) extends Parsers(positions) {
8080
lazy val `with` = keyword("with")
8181
lazy val `case` = keyword("case")
8282
lazy val `do` = keyword("do")
83-
lazy val `fun` = keyword("fun")
8483
lazy val `resume` = keyword("resume")
8584
lazy val `match` = keyword("match")
8685
lazy val `def` = keyword("def")

effekt/shared/src/main/scala/effekt/util/AnsiHighlight.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ object AnsiHighlight {
5959
// keywords
6060
case
6161
`let` | `val` | `var` | `if` | `else` | `while` |
62-
`type` | `effect` | `interface` | `fun` | `do` | `case` | `with` | `try` |
62+
`type` | `effect` | `interface` | `do` | `case` | `with` | `try` |
6363
`true` | `false` |
6464
`match` | `def` | `module`| `import`| `export`| `extern`| `include`|
6565
`record`| `box`| `return`| `region`|

0 commit comments

Comments
 (0)