diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-03 10:10:39 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-03 10:53:03 -0700 |
commit | 0cb886ae44505334dd5e8408b9355a53bc00e578 (patch) | |
tree | 41e66ce4b4265cf4a53e5774236d9248afcdf5dd /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
parent | ca74659bb06611b87474ffe2fd17b131cd3d34b0 (diff) | |
download | scala-0cb886ae44505334dd5e8408b9355a53bc00e578.tar.gz scala-0cb886ae44505334dd5e8408b9355a53bc00e578.tar.bz2 scala-0cb886ae44505334dd5e8408b9355a53bc00e578.zip |
Removed BackquotedIdent.
In favor of a marker attachment using Attachment, as suggested in
comments. (The Attachment interface needs work.) I did this bit trying
to fix SI-5715, but it's still a bit elusive because the Ident node is
thrown away as soon as there's a member definition.
Also, as far as I can see this will if anything propagate the
backquotedness of an identifier less effectively than before, because
TreeCopiers don't copy attachments. Maybe that's on the "todo" list? The
whole idea seems to depend on their being propagated to copies.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 337ca7671c..c02a7e493e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1027,7 +1027,7 @@ self => val tok = in.token val name = ident() t = atPos(start) { - if (tok == BACKQUOTED_IDENT) new BackQuotedIdent(name) + if (tok == BACKQUOTED_IDENT) Ident(name) withAttachment BackquotedIdentifier else Ident(name) } if (in.token == DOT) { @@ -2506,7 +2506,6 @@ self => } else { val nameOffset = in.offset - val isBackquoted = in.token == BACKQUOTED_IDENT val name = ident() funDefRest(start, nameOffset, mods, name) } @@ -2601,7 +2600,6 @@ self => newLinesOpt() atPos(start, in.offset) { val nameOffset = in.offset - val isBackquoted = in.token == BACKQUOTED_IDENT val name = identForType() // @M! a type alias as well as an abstract type may declare type parameters val tparams = typeParamClauseOpt(name, null) @@ -2660,7 +2658,6 @@ self => def classDef(start: Int, mods: Modifiers): ClassDef = { in.nextToken val nameOffset = in.offset - val isBackquoted = in.token == BACKQUOTED_IDENT val name = identForType() atPos(start, if (name == tpnme.ERROR) start else nameOffset) { savingClassContextBounds { @@ -2701,7 +2698,6 @@ self => def objectDef(start: Int, mods: Modifiers): ModuleDef = { in.nextToken val nameOffset = in.offset - val isBackquoted = in.token == BACKQUOTED_IDENT val name = ident() val tstart = in.offset atPos(start, if (name == nme.ERROR) start else nameOffset) { |