diff options
author | Martin Odersky <odersky@gmail.com> | 2007-02-12 15:53:42 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-02-12 15:53:42 +0000 |
commit | 41fefebc73be06f2c06820f5310774d3fb2f9e75 (patch) | |
tree | ec85a7b67559824afd64d7ec9ea20c56e815971a | |
parent | ed30031b5cbae38799cad01dad8590e72897876a (diff) | |
download | scala-41fefebc73be06f2c06820f5310774d3fb2f9e75.tar.gz scala-41fefebc73be06f2c06820f5310774d3fb2f9e75.tar.bz2 scala-41fefebc73be06f2c06820f5310774d3fb2f9e75.zip |
fixed problem with bug640
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index c0e231de6f..f85ffc8b4e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -2088,7 +2088,8 @@ trait Parsers requires SyntaxAnalyzer { in.token == TRAIT || in.token == OBJECT || in.token == CASEOBJECT || - in.token == LBRACKET || + in.token == LBRACKET || //todo: remove + in.token == AT || isModifier) { val annots = annotations() stats ++ joinComment(List(tmplDef(modifiers() withAnnotations annots))) @@ -2114,7 +2115,7 @@ trait Parsers requires SyntaxAnalyzer { stats ++= importClause() } else if (isExprIntro) { stats += expr() - } else if (isDefIntro || isModifier || in.token == LBRACKET) { + } else if (isDefIntro || isModifier || in.token == LBRACKET /*todo: remove */ || in.token == AT) { val annots = annotations() stats ++ joinComment(defOrDcl(modifiers() withAnnotations annots)) } else if (!isStatSep) { diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index ff0309a470..9c4dc59b96 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -444,7 +444,7 @@ trait Scanners requires SyntaxAnalyzer { def inFirstOfStat(token: int) = token match { case EOF | CASE | CATCH | ELSE | EXTENDS | FINALLY | MATCH | REQUIRES | WITH | YIELD | COMMA | SEMI | NEWLINE | NEWLINES | DOT | USCORE | COLON | EQUALS | ARROW | - LARROW | SUBTYPE | VIEWBOUND | SUPERTYPE | HASH | AT | + LARROW | SUBTYPE | VIEWBOUND | SUPERTYPE | HASH | // todo: add LBRACKET RPAREN | RBRACKET | RBRACE => false case _ => |