aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/parsing
Commit message (Collapse)AuthorAgeFilesLines
* Fix infinite loop in parser when parsing enumsFelix Mulder2017-04-171-1/+1
|
* Names are no longer SeqsMartin Odersky2017-04-112-4/+4
| | | | | | | | Drop Seq implementation of name. This implementation was always problematic because it entailed potentially very costly conversions to toSimpleName. We now have better control over when we convert a name to a simple name.
* Rename NameExtractor -> NameKindMartin Odersky2017-04-111-2/+1
|
* Make freshName semanticMartin Odersky2017-04-111-3/+4
|
* Bug fixesMartin Odersky2017-04-112-2/+2
| | | | nameddefaults.scala now compiles without crashing
* Disentangle Names from SeqsMartin Odersky2017-04-112-2/+2
| | | | | | | | | Structured names are not Seqs anymmore. But the Seq behavior is required in many places that mangle names. As an intermediate step we drop the Seq basetype but add Seq behavior through a decorator. Most Seq operations only work on SimpleTermNames and their TypeName analogue, will throw an exception wehn called on structured names.
* Rename PolyTypeTree -> LambdaTypeTreeMartin Odersky2017-04-061-1/+1
|
* Support comma-separated enum constantsMartin Odersky2017-04-041-7/+12
|
* Fix cheeky comment in nested scopeFelix Mulder2017-04-041-6/+17
|
* Make `getDocComment` referentially transparentFelix Mulder2017-04-041-36/+12
|
* Fix "closest" computation for docstringsMartin Odersky2017-04-041-1/+3
|
* 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-044-12/+13
| | | | `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-042-25/+95
| | | | 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
* Remove uses of StringOps from scala-reflectGuillaume Martres2017-03-081-2/+2
|
* Remove uses of Collections from scala-reflectGuillaume Martres2017-03-081-2/+1
|
* Use Chars object from dotty instead of scala.reflectGuillaume Martres2017-03-076-7/+8
|
* 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-142-10/+8
|
* Fix #1976: Hack to support scala.xml's $scope (#1977)odersky2017-02-141-1/+0
| | | | | | This is a gross hack to support the need for a $scope binding when XML literals are created. It should go away once we phase out XML literals. A library-based solution should use implicits instead.
* Fix parsing annotation on function typeGuillaume Martres2017-02-121-1/+5
|
* Merge pull request #1941 from dotty-staging/fix/infix-posodersky2017-02-082-15/+13
|\ | | | | Better positions for infix operations
| * Represent untyped operators as Ident instead of NameGuillaume Martres2017-02-052-15/+13
| | | | | | | | | | | | | | | | 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
|/
* Fix some dotty compilation errorsGuillaume Martres2017-01-281-1/+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
| |
* | Merge pull request #1775 from dotty-staging/add-implicit-funtypesodersky2016-12-182-52/+100
|\ \ | | | | | | Add implicit function types
| * | 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-172-43/+76
| | | | | | | | | | | | | | | - 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
| | |
* | | Make errors are not swept under the carpetMartin Odersky2016-12-171-1/+2
|/ / | | | | | | | | | | | | | | | | Typer#ensureReported's comment outlines an example where errors could go unreported, resulting in error trees after typer without any reported error messages. This commit makes sure that at least one error is reported if a tree node has an error type. Fixes #1802.
* | only allow $_ in patternsliu fengyun2016-12-121-6/+6
| |
* | fix #1779: support $_ and $_id in interpolated stringliu fengyun2016-12-082-1/+5
|/
* 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.