From ce53d0dc9cb2a1b1cdd27d9b2a3c9b682e03e8de Mon Sep 17 00:00:00 2001 From: sbucher Date: Thu, 19 Aug 2004 13:46:10 +0000 Subject: make now initializes parser before returning it --- sources/scala/xml/parsing/ParserFactory.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sources') diff --git a/sources/scala/xml/parsing/ParserFactory.scala b/sources/scala/xml/parsing/ParserFactory.scala index 95b734b3b3..99126fd397 100644 --- a/sources/scala/xml/parsing/ParserFactory.scala +++ b/sources/scala/xml/parsing/ParserFactory.scala @@ -13,13 +13,15 @@ object ParserFactory { } def make(theHandle:ConstructingHandler, input:Iterator[Char]): ConstructingParser = { - new ConstructingParser() { + val p = new ConstructingParser() { val it = input; override val handle = theHandle; def nextch = { ch = it.next; pos = pos + 1; } def init = { ch = it.next; pos = 0; } override val preserveWS = true; - } + }; + p.init; + p } } -- cgit v1.2.3