aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fix infinite loop in parser when parsing enumsFelix Mulder2017-04-171-1/+1
|
* Rename NameExtractor -> NameKindMartin Odersky2017-04-111-2/+1
|
* Make freshName semanticMartin Odersky2017-04-111-3/+4
|
* Rename PolyTypeTree -> LambdaTypeTreeMartin Odersky2017-04-061-1/+1
|
* Support comma-separated enum constantsMartin Odersky2017-04-041-7/+12
|
* Change handling of enum defs.Martin Odersky2017-04-041-12/+29
| | | | | | | The previous scheme did not work because desugaring cannot deal with repeated expansions. We now sidestep the issue by doing the expansion in the parser. Luckily, positions work out perfectly, so that one can reconstruct the source precisely from the parsed untyped trees.
* Simplify syntaxMartin Odersky2017-04-041-6/+3
| | | | `enum' only allowed as a prefix of classes, dropped from traits and objects.
* Don't pass docstring as a parameter.Martin Odersky2017-04-041-39/+33
| | | | | It's completely redundant, docstring is just the comment found at the `start` offset, which is passed anyway.
* Add enum syntaxMartin Odersky2017-04-041-25/+91
| | | | Modify syntax.md and Tokens/Parser/untpd to support enums.
* Fix varargs in methods and constructors (#2135)Igor Mielientiev2017-03-221-1/+21
| | | | | | | * Fix varargs in methods (Issue: #1625) * Fix minor comments * Change varargs parameter message * Fix failed test, fix case for constructor
* Drop named type parameters in classesMartin Odersky2017-03-041-21/+13
| | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* Better location to indicate the errorEnno Runne2017-02-271-1/+1
|
* Change 'private, protected, or this expected' to MessageEnno Runne2017-02-231-3/+4
|
* Fix #2009: Fix placeholder params logic for lambdas (#2019)odersky2017-02-221-7/+9
| | | | | | | | | | * Fix #2009: Fix placeholder params logic for lambdas Logic was missing placeholders in rhs of lambdas. * Add comment * Fix typo
* Incorporated comments from @felixmulderEnno Runne2017-02-201-4/+4
|
* Change 'mixed left- and right-associative operators' to MessageEnno Runne2017-02-201-8/+7
|
* Change '... expected but found ...' to MessageEnno Runne2017-02-141-9/+5
|
* Fix parsing annotation on function typeGuillaume Martres2017-02-121-1/+5
|
* Merge pull request #1941 from dotty-staging/fix/infix-posodersky2017-02-081-14/+12
|\ | | | | Better positions for infix operations
| * Represent untyped operators as Ident instead of NameGuillaume Martres2017-02-051-14/+12
| | | | | | | | | | | | | | | | This has two advantages: - We can distinguish BackquotedIdent from Ident, allowing the user to use a defined "type `&`", see testcase. - We get better positions for the operators. This is useful in IDEs, for example to get the type at point.
* | Allow implicit-by-name parametersMartin Odersky2017-02-081-6/+2
|/
* Improve error position and drop second error since it is prunedJonathan Brachthäuser2017-01-081-1/+1
|
* Replace all occurrences of Id, ident or Ident with idJonathan Brachthäuser2017-01-081-36/+36
| | | | | | | To match the specs in https://github.com/lampepfl/dotty/blob/master/docs/syntax-summary.txt all occurences of Id, ident or Ident in comments have been replaced with the terminal `id`.
* Add error message for dangling this in path selectionsJonathan Brachthäuser2017-01-081-1/+1
| | | | | | | | | | | | The following examples trigger the error message: val x: Foo.this = ??? // Also triggers the error: import foo.this // Additionally, also slays the compiler type X = Foo.this.type
* Add error message for unbound wildcard type.Jarrod Janssen2017-01-021-1/+1
|
* Fix #1716: Don't allow wildcards as type arguments to methodsMartin Odersky2016-12-251-8/+12
| | | | | | | | Wildcards don't make sense as type arguments to methods, and I believe to keep things simple this should also apply to method type arguments in patterns. The best way to enforce this is to make use of the existing infrastructure in the parser for topLevelTypes.
* Add error messages - Parsers.scala:712 (#1842)Adam Trousdale2016-12-211-1/+1
| | | | | * Add error messages - Parsers.scala:712 * Tidy up imports and formatting
* Merge pull request #1822 from dotty-staging/fix-#1792odersky2016-12-181-0/+2
|\ | | | | Fix #1792: Allow newline in front of `{` for procedure syntax
| * Fix #1792: Allow newline in front of `{` when supporting procedure syntax.Martin Odersky2016-12-141-0/+2
| |
* | Add code to disable old implicit closure syntax in blocksMartin Odersky2016-12-171-1/+11
| | | | | | | | | | | | | | This will no longer be supported. On the other hand, as long as the alternative is not yet legal in Scala2.x we cannot flag this as an error. So the migration warning/error and patch code is currently disabled.
* | Generalize syntax for implicit function valuesMartin Odersky2016-12-171-43/+74
| | | | | | | | | | - allow more than one implicit binding - harmonize syntax in expressions and blocks
* | Cleanup of implicit modifiers schemeMartin Odersky2016-12-171-13/+12
| | | | | | | | | | Implicit modifiers were quite irregular compared to the other ones. This commit does a cleanup.
* | Add syntax for implicit functionsMartin Odersky2016-12-171-5/+11
| |
* | only allow $_ in patternsliu fengyun2016-12-121-6/+6
| |
* | fix #1779: support $_ and $_id in interpolated stringliu fengyun2016-12-081-0/+4
|/
* Rename ...Pos to ...Offset and add pointOffsetMartin Odersky2016-11-241-36/+37
|
* More robust scheme for taking start/end of positions when parsingMartin Odersky2016-11-241-31/+40
| | | | | | | Some trees, which do not consume input have unassigned positions (so that they can fit in whatever range they are integrated). It's therefore risky to take the start or end of a parsed tree's position. This commit guards against the case where the position of the tree does not exist.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+2309