Skip to content

Commit 0b2480c

Browse files
committed
While at it, also drop fun
1 parent 236fd20 commit 0b2480c

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 `extern`
@@ -177,7 +176,7 @@ object TokenKind {
177176

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

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

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

410410
def isToplevel: Boolean = peek.kind match {
411-
case `val` | `fun` | `def` | `type` | `effect` | `namespace` | `interface` | `type` | `record` | `var` | `include` | `extern` => true
411+
case `val` | `def` | `type` | `effect` | `namespace` | `interface` | `type` | `record` | `var` | `include` | `extern` => true
412412
case _ => false
413413
}
414414

@@ -861,12 +861,6 @@ class Parser(positions: Positions, tokens: Seq[Token], source: Source) {
861861
Box(captures, expr, span())
862862
}
863863

864-
// TODO deprecate
865-
def funExpr(): Term =
866-
nonterminal:
867-
val blockLiteral = `fun` ~> BlockLiteral(Nil, valueParams().unspan, Nil, braces { stmts(inBraces = true) }, span())
868-
Box(Maybe.None(Span(source, pos(), pos(), Synthesized)), blockLiteral, blockLiteral.span.synthesized)
869-
870864
def newExpr(): Term =
871865
nonterminal:
872866
New(`new` ~> implementation(), span())
@@ -1179,7 +1173,6 @@ class Parser(positions: Positions, tokens: Seq[Token], source: Source) {
11791173
case `try` => tryExpr()
11801174
case `region` => regionExpr()
11811175
case `box` => boxExpr()
1182-
case `fun` => funExpr()
11831176
case `new` => newExpr()
11841177
case `do` => doExpr()
11851178
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)