From 2d8b1c7ffc9bce27da394c1e9fc4b26bf26de299 Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Mon, 29 Mar 2010 13:38:11 +0000 Subject: Patch from Mirko Stocker to add position inform... Patch from Mirko Stocker to add position information to val/var modifiers on ctor params for use by tools. Review by odersky. --- src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index cf3f0bc352..30aaf56ceb 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1721,8 +1721,10 @@ self => mods = modifiers() | Flags.PARAMACCESSOR if (mods.hasFlag(Flags.LAZY)) syntaxError("lazy modifier not allowed here. Use call-by-name parameters instead", false) if (in.token == VAL) { + mods = mods withPosition (in.token, tokenRange(in)) in.nextToken() } else if (in.token == VAR) { + mods = mods withPosition (in.token, tokenRange(in)) mods |= Flags.MUTABLE in.nextToken() } else if (!caseParam) { -- cgit v1.2.3