These are chat archives for ThoughtWorksInc/Binding.scala

17th
Jun 2018
Moritz Bust
@Busti
Jun 17 2018 15:31
I recently had a chat with the folks over at scala/contributors and became aware of the fact that xml mode will be faded out with scala 3.
What will happen with binding.scala when that happens?
杨博 (Yang Bo)
@Atry
Jun 17 2018 16:04
@Busti Where is the link of the chat
Moritz Bust
@Busti
Jun 17 2018 16:05
@Atry Seems like the discussion is still going on at https://gitter.im/scala/contributors
Moritz Bust
@Busti
Jun 17 2018 16:34
Does binding.scala use a compiler plugin to parse the contend of @dom methods differently?
Or does it rely on xml literals?
杨博 (Yang Bo)
@Atry
Jun 17 2018 16:35
No. Instead, Binding.scala hacks the AST generated by the Scala parser.
Moritz Bust
@Busti
Jun 17 2018 16:37
Does that mean that an attr without a value like <foo bar></foo> is possible?
杨博 (Yang Bo)
@Atry
Jun 17 2018 16:39
Are you talking about Scala 3 or the current version of Binding.scala?
Moritz Bust
@Busti
Jun 17 2018 16:41
The current version of binding.scala . Since scala xml literals are not sgml literals, the above is not valid xml.
杨博 (Yang Bo)
@Atry
Jun 17 2018 16:42
I don't think Scala 2 parser accepts <foo bar></foo>
Moritz Bust
@Busti
Jun 17 2018 16:43
I recently tried it on https://astexplorer.net/ and it failed without generating ast for the "malformed" literal.
杨博 (Yang Bo)
@Atry
Jun 17 2018 16:46
🤷
Moritz Bust
@Busti
Jun 17 2018 16:46
Thanks a lot for your answers :)