From 5926432c7b951da1a6da16aa0bbdde56e97843af Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Mon, 23 Jan 2023 00:36:41 +0000 Subject: [PATCH] removed an attempt that made a counter intuitive error message for unclosed comments --- parsley/shared/src/main/scala/parsley/token/Lexer.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsley/shared/src/main/scala/parsley/token/Lexer.scala b/parsley/shared/src/main/scala/parsley/token/Lexer.scala index ef006066a..f2a39b76b 100644 --- a/parsley/shared/src/main/scala/parsley/token/Lexer.scala +++ b/parsley/shared/src/main/scala/parsley/token/Lexer.scala @@ -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} @@ -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 } }