File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
shared/src/main/scala/scala/util/parsing/combinator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ trait PackratParsers extends Parsers {
162162 case None => /* no heads*/ cached
163163 case Some (h@ Head (hp, involved, evalSet)) => {
164164 // heads found
165- if (cached == None && ! (hp:: involved contains p)) {
165+ if (cached.isEmpty && ! (hp:: involved contains p)) {
166166 // Nothing in the cache, and p is not involved
167167 return Some (MemoEntry (Right (Failure (" dummy " ,in))))
168168 }
@@ -187,7 +187,7 @@ trait PackratParsers extends Parsers {
187187 * the current parser again
188188 */
189189 private def setupLR (p : Parser [_], in : PackratReader [_], recDetect : LR ): Unit = {
190- if (recDetect.head == None ) recDetect.head = Some (Head (p, Nil , Nil ))
190+ if (recDetect.head.isEmpty ) recDetect.head = Some (Head (p, Nil , Nil ))
191191
192192 in.lrStack.takeWhile(_.rule != p).foreach {x =>
193193 x.head = recDetect.head
You can’t perform that action at this time.
0 commit comments