Skip to content

Commit

Permalink
Fix logic for generating doc comment tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
BinderDavid committed Oct 2, 2024
1 parent feba5a3 commit 61f0067
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions effekt/shared/src/main/scala/effekt/Lexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,14 @@ class Lexer(source: Source) {
case _ => consume()
}
}
// exclude //
val comment = slice(start + 2, current)

if comment.startsWith("/") then
val doc_comment = slice(start + 1, current)
// exclude ///
val doc_comment = slice(start + 3, current)
TokenKind.DocComment(doc_comment)
else
// exclude //
val comment = slice(start + 2, current)
TokenKind.Comment(comment)
}

Expand Down

0 comments on commit 61f0067

Please sign in to comment.