| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
`enum' only allowed as a prefix of classes, dropped from traits and objects.
|
|
|
|
|
| |
It's completely redundant, docstring is just the comment found
at the `start` offset, which is passed anyway.
|
|
|
|
| |
Modify syntax.md and Tokens/Parser/untpd to support enums.
|
|
|
|
|
|
|
| |
* Fix varargs in methods (Issue: #1625)
* Fix minor comments
* Change varargs parameter message
* Fix failed test, fix case for constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix #2009: Fix placeholder params logic for lambdas
Logic was missing placeholders in rhs of lambdas.
* Add comment
* Fix typo
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Better positions for infix operations
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
* Tidy up imports and formatting
|
|\
| |
| | |
Fix #1792: Allow newline in front of `{` for procedure syntax
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
- allow more than one implicit binding
- harmonize syntax in expressions and blocks
|
| |
| |
| |
| |
| | |
Implicit modifiers were quite irregular compared
to the other ones. This commit does a cleanup.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|