diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-01-22 15:02:53 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-01-22 15:02:53 +1000 |
commit | 4286e2df2effc4102f6ed5e576848d60bbc8dcb6 (patch) | |
tree | acc14285aaf924b740d470ed848ca6c21d9e9712 /src/compiler | |
parent | 89cf671469efad05ecb2bde88d8f5202199d8d30 (diff) | |
parent | 4d96a8ad0b7050303e0b841708ba452e708f6a35 (diff) | |
download | scala-4286e2df2effc4102f6ed5e576848d60bbc8dcb6.tar.gz scala-4286e2df2effc4102f6ed5e576848d60bbc8dcb6.tar.bz2 scala-4286e2df2effc4102f6ed5e576848d60bbc8dcb6.zip |
Merge pull request #4214 from som-snytt/issue/5154
SI-5154 Parse leading literal brace in XML pattern
Diffstat (limited to 'src/compiler')
-rwxr-xr-x | src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala index f1517e56a0..96939e616c 100755 --- a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala @@ -425,11 +425,10 @@ trait MarkupParsers { if (ch != '/') ts append xPattern // child else return false // terminate - case '{' => // embedded Scala patterns - while (ch == '{') { - nextch() + case '{' if xCheckEmbeddedBlock => // embedded Scala patterns, if not double brace + do { ts ++= xScalaPatterns - } + } while (xCheckEmbeddedBlock) assert(!xEmbeddedBlock, "problem with embedded block") case SU => |