diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 7 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala index 49c6b2ffba..d0265ac95c 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala @@ -30,8 +30,7 @@ import util.Chars.{ SU, LF } * @author Burak Emir * @version 1.0 */ -trait MarkupParsers -{ +trait MarkupParsers { self: Parsers => case object MissingEndTagControl extends ControlThrowable { @@ -294,7 +293,7 @@ trait MarkupParsers while (ch != SU) { if (ch == '}') { if (charComingAfter(nextch) == '}') nextch - else errorBraces + else errorBraces() } buf append ch @@ -318,7 +317,7 @@ trait MarkupParsers } finally parser.in resume Tokens.XMLSTART - EmptyTree + parser.errorTermTree } /** Use a lookahead parser to run speculative body, and return the first char afterward. */ diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 622c4054e8..071926e7c6 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1309,10 +1309,6 @@ self => def postfixExpr(): Tree = { val base = opstack var top = prefixExpr() - // Various errors in XML literals can cause xmlLiteral to propagate - // EmptyTree's. Watch out for them here. - if (top == EmptyTree) - return EmptyTree while (isIdent) { top = reduceStack(true, base, top, precedence(in.name), treeInfo.isLeftAssoc(in.name)) @@ -1400,9 +1396,6 @@ self => } def simpleExprRest(t: Tree, canApply: Boolean): Tree = { - // Various errors in XML literals can cause xmlLiteral to propagate - // EmptyTree's. Watch out for them here (see also postfixExpr). - if (EmptyTree == t) return EmptyTree // #3604 (mics) if (canApply) newLineOptWhenFollowedBy(LBRACE) in.token match { case DOT => |