Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ scala-xml
[![latest release for 3.0](https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-xml_3.svg?label=scala+3)](http://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_3)
=========

The standard Scala XML library. Please file XML issues here, not at https://github.com/scala/bug/issues or http://github.com/lampepfl/dotty/issues.
The standard Scala XML library. Please file XML issues here, not at https://github.com/scala/bug/issues or http://github.com/scala/scala3/issues.

The decoupling of scala-xml from the Scala compiler and standard library is possible because the compiler desugars XML literals in Scala source code into a set of method calls.
Alternative implementations of these calls are welcome!
Compiler code that shows the calls needed:
[Scala 2.11](https://github.com/scala/scala/blob/2.11.x/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala),
[Scala 2.12](https://github.com/scala/scala/blob/2.12.x/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala),
[Scala 2.13](https://github.com/scala/scala/blob/2.13.x/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala),
[Scala 3](https://github.com/lampepfl/dotty/blob/main/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala).
[Scala 3](https://github.com/scala/scala3/blob/main/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala).

API documentation is available [here](https://javadoc.io/doc/org.scala-lang.modules/scala-xml_2.13/).

Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/scala/scala/xml/parsing/MarkupParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests {
// See ticket #3720 for motivations.
// As for why it's `private[parsing]` rather than merely `private`, see
// https://github.com/scala/scala-xml/issues/541 ; the broader access is necessary,
// for now anyway, to work around https://github.com/lampepfl/dotty/issues/13096
// for now anyway, to work around https://github.com/scala/scala3/issues/13096
private[parsing] class WithLookAhead(underlying: Source) extends Source {
private val queue: scala.collection.mutable.Queue[Char] = scala.collection.mutable.Queue[Char]()
def lookahead(): BufferedIterator[Char] = {
Expand Down Expand Up @@ -99,7 +99,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests {

/** holds temporary values of pos */
// Note: if marked as an override, this causes a "...cannot override a mutable variable" error with Scala 3;
// SethTisue noted on Oct 14, 2021 that lampepfl/dotty#13744 should fix it - and it probably did,
// SethTisue noted on Oct 14, 2021 that scala/scala3#13744 should fix it - and it probably did,
// but Scala XML still builds against Scala 3 version that has this bug, so this still can not be marked as an override :(
var tmppos: Int = _

Expand Down