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 283dc2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions effekt/shared/src/main/scala/effekt/Lexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,12 @@ 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
TokenKind.Comment(comment)
Expand Down

0 comments on commit 283dc2f

Please sign in to comment.