diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-04 18:00:37 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-04 18:00:37 +0200 |
commit | b28c9ef75e274bdc54e9502e56c95b505495de5b (patch) | |
tree | 84b350bffb77d521d7c8393096b43deca78f5e5f /src/dotty/tools/dotc/parsing | |
parent | 4fc1d8501a3937547e05f14aa4f4423a2c0d6a1d (diff) | |
download | dotty-b28c9ef75e274bdc54e9502e56c95b505495de5b.tar.gz dotty-b28c9ef75e274bdc54e9502e56c95b505495de5b.tar.bz2 dotty-b28c9ef75e274bdc54e9502e56c95b505495de5b.zip |
Refactoring: breaking out desugaring into its own object.
Also, changing the maps in Namer. More commenting needs to be done. Pushing now to get off this machine and
back to the new one, which just came back form repair.
Diffstat (limited to 'src/dotty/tools/dotc/parsing')
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index b6411f7cc..13e5494cb 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -284,9 +284,7 @@ object Parsers { tree } - def emptyConstructor() = atPos(in.offset) { - makeConstructor(Modifiers(), Nil) - } + def emptyConstructor() = atPos(in.offset) { ast.untpd.emptyConstructor } /* -------------- XML ---------------------------------------------------- */ @@ -1653,7 +1651,7 @@ object Parsers { accept(EQUALS) atPos(in.offset) { constrExpr() } } - makeConstructor(mods, vparamss, rhs) + makeConstructor(mods, Nil, vparamss, rhs) } else { val name = ident() val tparams = typeParamClauseOpt(ParamOwner.Def) @@ -1744,14 +1742,14 @@ object Parsers { */ def classDef(mods: Modifiers): ClassDef = atPos(tokenRange) { val name = ident().toTypeName - val tparams = typeParamClauseOpt(ParamOwner.Class) val constr = atPos(in.offset) { + val tparams = typeParamClauseOpt(ParamOwner.Class) val cmods = constrModsOpt() val vparamss = paramClauses(name, mods is Case) - makeConstructor(cmods, vparamss) + makeConstructor(cmods, tparams, vparamss) } val templ = templateOpt(constr) - ClassDef(mods, name, tparams, templ) + ClassDef(mods, name, templ) } /** ConstrMods ::= AccessModifier |