Skip to content

Commit

Permalink
removed an attempt that made a counter intuitive error message for un…
Browse files Browse the repository at this point in the history
…closed comments
  • Loading branch information
j-mie6 committed Jan 23, 2023
1 parent 599b904 commit 5926432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parsley/shared/src/main/scala/parsley/token/Lexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package parsley.token

import parsley.Parsley, Parsley.{attempt, unit}
import parsley.Parsley, Parsley.unit
import parsley.character.satisfyUtf16
import parsley.combinator.{between, eof, sepBy, sepBy1, skipMany}
import parsley.errors.combinator.{markAsToken, ErrorMethods}
Expand Down Expand Up @@ -852,7 +852,7 @@ class Lexer(desc: descriptions.LexicalDesc, errConfig: errors.ErrorConfig) {
case Basic(ws) => new Parsley(new singletons.WhiteSpace(ws, desc.spaceDesc, errConfig))
// satisfyUtf16 is effectively hidden, and so is Comment
case Unicode(ws) if desc.spaceDesc.supportsComments =>
skipMany(attempt(new Parsley(new singletons.Comment(desc.spaceDesc, errConfig))) <|> satisfyUtf16(ws))//.hide
skipMany(new Parsley(new singletons.Comment(desc.spaceDesc, errConfig)) <|> satisfyUtf16(ws))//.hide
case Unicode(ws) => skipMany(satisfyUtf16(ws))//.hide
}
}
Expand Down

0 comments on commit 5926432

Please sign in to comment.