aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/parsing
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix patch for constructors with procedure syntaxMartin Odersky2016-03-121-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A constructor def this() { ... } needs to be rewritten to def this() = { ... } not to def this(): Unit = { ... }
| * Untangle withAnnotation naming.Martin Odersky2016-03-121-1/+1
| |
| * Better encapsulationMartin Odersky2016-03-121-1/+1
| | | | | | | | | | No more leaking ofMove PatchedFiles in a settings option. Move all patch classes into a `Rewrites` object.
| * Add patching functionality for migrationMartin Odersky2016-03-121-1/+6
| | | | | | | | | | Firs version of patching that can be invoked by dotty compiler itself.
* | make token declarations consistentliu fengyun2016-03-141-2/+2
|/
* Allow successive opening comments.Martin Odersky2016-03-071-11/+11
| | | | Fixes #1052.
* Allow Named Arguments in TypeArgsMartin Odersky2016-02-191-2/+2
| | | | Lets one also pass named arguments to methods.
* First version of named type argumentsMartin Odersky2016-02-191-5/+35
|
* Support named type parametersMartin Odersky2016-02-191-1/+1
| | | | | Changes needed to support simple named type parameters. Not yet implemented: named arguments.
* Improve migration message for Scala 2 proceduresGuillaume Martres2016-01-141-1/+1
| | | | | | It's not correct to just add `=` you also need to specify the return type to be `Unit` otherwise things may not work as expected, this is especially important for a `main` method.
* Fix parsing of blocks that end in an importMartin Odersky2015-12-191-1/+2
|
* Avoid taking references before toplevel symbols are entered.Martin Odersky2015-11-092-4/+2
| | | | | | | | Taking a reference means that the symbol will be brought forward into the current run, then if the same symbol is entered from source, a datarace ensues. This affected the ProductN symbols because these are automatically added to a case class suring desugaring.
* Avoid spurious procedure syntax migration warningMartin Odersky2015-11-091-1/+1
|
* Add scalaMode and testScalaMode to TypeOpsMartin Odersky2015-11-051-2/+2
|
* Emit a migration warning in Parser when hitting a Scala2 feature.Martin Odersky2015-11-051-4/+9
|
* Merge pull request #900 from dotty-staging/fix-#871odersky2015-11-051-3/+15
|\ | | | | Deal gracefully with missing return types of abstract menthods.
| * Deal gracefully with missing return types of abstract menthods.Martin Odersky2015-11-011-3/+15
| | | | | | | | | | | | | | 1) Better error message: "missing return type" instead of `=' expected. 2) Allow them under language:Scala2 Fixes #871
* | Merge pull request #901 from dotty-staging/fix-#851Dmitry Petrashko2015-11-031-1/+1
|\ \ | | | | | | Fix #851 Java parsing forgot type parameters
| * | Don't interpreter $init$ as a constructor when parsing Java files.Martin Odersky2015-11-011-1/+1
| |/ | | | | | | Fixes #851.
* / Parentheses around a wildcard should not produce a lambdaMartin Odersky2015-11-021-0/+1
|/ | | | | | | `(_)` and `(_: T)` should not be converted to functions x => x (x: T) => x
* Set position on annotations parsed from JavaGuillaume Martres2015-10-291-1/+1
| | | | Fix a crash in Typer#assertPositioned
* Hardening of Parser against illegal flag combinationsMartin Odersky2015-10-221-9/+19
| | | | Avoids accidental combinations of term and type flags.
* Add -language:Scala2 optionMartin Odersky2015-09-121-3/+7
| | | | | Avoids having to fix all occurrences of procedure syntax. Will be extended to other backwards compatible features.
* Make it a syntactic criterion whether a literal is a legal typeMartin Odersky2015-08-242-2/+4
| | | | | Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be types.
* Add literal-based singleton types (SIP-23).Martin Odersky2015-08-231-0/+2
| | | | Only the parser needed to be updated. Everything else works out of the box.
* Add @sharable annotationMartin Odersky2015-07-061-2/+2
| | | | | | | Add @sharable annotation for classes and vals that are presumed to be safely sharable between threads. Also: Document CtxLazy.
* Avoid crasher when first token of a program is in errorMartin Odersky2015-06-251-1/+1
| | | | | This used to give a crash in SourcePositiom, promoted by feeding its calculations with a negative offset.
* Disallow {...} arguments for annotationsMartin Odersky2015-05-211-2/+2
| | | | | This mimics scalac's behavior (but not the official syntax; in fact the official syntax seems to be ambiguous.
* Allow AnnotatedType in operands of `with`.Martin Odersky2015-05-211-10/+14
| | | | Brings in line with Scala 2 spec.
* Allow byname repated parametersMartin Odersky2015-04-241-9/+13
| | | | Implements #499
* Ensure spaces after `if` in Dotty source.Dmitry Petrashko2015-04-092-5/+5
|
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-094-9/+9
|
* Code simplifications stimulated by SimplifyBooleanExpressionChecker.Dmitry Petrashko2015-04-092-2/+5
|
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-092-2/+2
|
* Ensure that start position is <= end position in ParserMartin Odersky2015-03-181-1/+1
|
* Fix bug which prevented New over type-instantiated aliases.Martin Odersky2015-02-281-6/+1
| | | | | | | | | | | Previously, type Map = HashMap[Int, String] new Map did not work. See test aliasNew.scala for a test. Formerly this logic handled in Parsers (wrapNew), but that one does not work for aliastypes.
* Fix erasure of trait infoMartin Odersky2014-12-051-12/+12
| | | | | | | | After erasure, traits always extend object, and no other class. The change flushed out three more problems, one in the handling of Super trees in erasure, another in bridge method generation. and a third that class RepeatedParam had Seq, which is a trait, as first parent.
* Adapting branch to absence of modifiers in trees.Dmitry Petrashko2014-11-221-25/+25
|
* create dummy first constructor for Java classesOndrej Lhotak2014-11-221-21/+26
| | | | | | The dummy constructor is needed so that the real constructors see the import of the companion object. The constructor has a parameter of type Unit so that no Java code can call it.
* make annotation classes abstract (since they are interfaces)Ondrej Lhotak2014-11-221-1/+1
|
* fix calls to tree copier that now requires multiple parameter listsOndrej Lhotak2014-11-221-2/+2
|
* Flags.Static renamed to JavaStaticOndrej Lhotak2014-11-221-8/+8
|
* Initial implementation of Java scanner and parserOndrej Lhotak2014-11-226-202/+1780
| | | | | | | | | | | | | Ported from scalac 2.11.x branch SHA 9753f23f9362b25a9f481b11dd8d51187187882a This is mostly a direct port, with few significant dotty-specific changes needed. The two more significant changes are: In dotty, the first constructor of a class is pulled out separately from the other stats in the Template. The keyword detection code (buildKeywordArray) was moved into Tokens so that it can more cleanly be shared by the Scala and Java scanners.
* Factored out Positioned into separate file.Martin Odersky2014-11-111-0/+1
|
* Drop modifiers as separate data from MemberDef treesMartin Odersky2014-11-102-16/+16
| | | | Typed MemberDef trees now take the modifiers from their symbol's data.
* Postponing desugaring of Try nodes.Dmitry Petrashko2014-10-301-9/+1
| | | | Instead of desugaring in parser desugaring is now done during desugaring.
* Restructure Try node.Dmitry Petrashko2014-10-301-1/+9
| | | | | | Now Try node always has cases as handlers. In case handler is an Ident of type Throwable => T than it's desugared to a CaseDef during parsing.
* Added OuterAccessor flag.Martin Odersky2014-09-011-2/+2
| | | | Also regorganized flags a bit to better use available slots.
* Switched to new cpy scheme.Martin Odersky2014-08-131-1/+1
| | | | Avoid mentioning arguments that are unchanged.
* Changes to tree copyingMartin Odersky2014-08-131-8/+8
| | | | | | | | 1) Add copiers with default arguments, to avoid boilerplate 2) All copiers are now curried wrt first argument (which is the original tree). We already make use of the new features in cpy.DefDef, but not yet elsewhere.