This page is no longer maintained — Please continue to the home page at www.scala-lang.org

XML literals broken on trunk?

2 replies
dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Right now, I'm not able to enter any multiline XML literals inside REPL on trunk. Well, at rev 18006. Is it a known bug? Is it fixed already? The error I get is:   scala> val xml=<xml>
     | </xml>
<console>:2: error: illegal start of simple pattern
       </xml>
^
--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic reviews: review by name, review by reference and review by value.
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: XML literals broken on trunk?

On Wed, Jun 17, 2009 at 12:34:36PM -0300, Daniel Sobral wrote:
> Right now, I'm not able to enter any multiline XML literals inside
> REPL on trunk. Well, at rev 18006. Is it a known bug? Is it fixed
> already? The error I get is:
>
> scala> val xml=
> |
> :2: error: illegal start of simple pattern
>
> ^

% scala
Welcome to Scala version 2.8.0.r0-b20090616082026
scala> val xml =
|
xml: scala.xml.Elem =

It looks like you can't jam the xml element up against the = sign, and
that it has always been thus.

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: XML literals broken on trunk?
Cool! Now, could you disable tab completion inside xml literals? Pasting stuff has been a chore...   As in:   val xml = <root> \t<element/> </root>   With a proper translation for \t. :-)

On Wed, Jun 17, 2009 at 2:02 PM, Paul Phillips <paulp@improving.org> wrote:
On Wed, Jun 17, 2009 at 12:34:36PM -0300, Daniel Sobral wrote:
> Right now, I'm not able to enter any multiline XML literals inside
> REPL on trunk. Well, at rev 18006. Is it a known bug? Is it fixed
> already? The error I get is:
>
> scala> val xml=<xml>
>      | </xml>
> <console>:2: error: illegal start of simple pattern
>        </xml>
> ^

% scala
Welcome to Scala version 2.8.0.r0-b20090616082026
scala> val xml = <xml>
    | </xml>
xml: scala.xml.Elem =
<xml>
      </xml>

It looks like you can't jam the xml element up against the = sign, and
that it has always been thus.

--
Paul Phillips      | Adultery is the application of democracy to love.
Protagonist        |     -- H. L. Mencken
Empiricist         |
all hip pupils!    |----------* http://www.improving.org/paulp/ *----------



--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic reviews: review by name, review by reference and review by value.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland