aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing
Commit message (Collapse)AuthorAgeFilesLines
* Make `typeDiff` aware of placeholder typesFelix Mulder2016-10-101-19/+36
|
* Refactor explanation interpolatorFelix Mulder2016-10-102-48/+85
|
* Unrainbow syntax highlightingFelix Mulder2016-10-101-1/+3
|
* Better operator highlightingFelix Mulder2016-10-101-4/+5
|
* Improve syntax highlighting on polymorphic defsFelix Mulder2016-10-101-2/+5
|
* Improve syntax highlighting for ValDefsFelix Mulder2016-10-101-17/+37
|
* Make relevant parts of compiler conform to new error handlingFelix Mulder2016-10-101-2/+3
|
* Make `FancyConsoleReporter` and `Highlighting` obey color settingFelix Mulder2016-10-102-12/+34
| | | | | | | Fancy console reporter and the string interpolator for highlighting now obey the color setting - this means that the next step towards unifying the reporters is to make sure the tests work with `FancyConsoleReporter` under the `-color:never` flag.
* Add modifiers to highlightingFelix Mulder2016-10-101-31/+39
|
* Add coloring utilFelix Mulder2016-10-101-0/+60
|
* Refactor common error messages to `diagnostic.basic`Felix Mulder2016-10-101-1/+1
|
* Rename Diagnostic to diagnostic.MessageFelix Mulder2016-10-101-2/+3
|
* Add ability to choose between fancy and non-fancy outputFelix Mulder2016-10-101-2/+3
|
* Simplify "hl" interpolatorFelix Mulder2016-10-101-11/+2
|
* Add highlighting for `???`Felix Mulder2016-10-101-1/+6
|
* Return iterable from highlighting function instead of vectorFelix Mulder2016-10-101-2/+2
|
* Add highlighter string interpolatorFelix Mulder2016-10-101-0/+16
|
* Make inline a keywordMartin Odersky2016-10-021-1/+1
| | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
* Juggling with close in RefinedPrinterMartin Odersky2016-10-021-10/+7
| | | | | | Because of different close seqences before and after pickling we could get spurious differences, where in one file things were put on one line, and in the pther there was a linebreak.
* Fix problem with homogenize treesMartin Odersky2016-10-021-1/+1
|
* Drop Inlined when homogenizeMartin Odersky2016-10-021-2/+7
| | | | Pickler drops Inlined nodes, so homogenize needs to do the same.
* Add Inlined tree nodeMartin Odersky2016-10-021-0/+2
| | | | | | | | | ... to tag inlined calls. Perform typings and transformations of inlined calls in a context that refers to the INlined node in its InlinedCall property. The idea is that we can use this to issue better error positions. This remains to be implemented.
* Eliminate tpd.Modifiers.Martin Odersky2016-09-261-1/+6
| | | | | | Backend does not need them after all, can just use nulls there. So the functionality is only used for printing, and it makes sense to move everything there.
* Drop tpd.modsDecoMartin Odersky2016-09-261-2/+4
| | | | Prefer to access directly via symbol.
* Get rid of SelectFromType tree node.Martin Odersky2016-09-251-3/+2
| | | | | | Roll its functionality into Select. Since we can always tell whether a tree is a type or term there is no expressiveness gained by having a separate tree node.
* Drop PairMartin Odersky2016-09-251-3/+1
| | | | | | | | Drop tree node class 'Pair'. It was used only in imports, where it can easily be replaced by Thicket. The envisaged use for generic pairs is almost sure better modelled by a "Pair" class in Dotty's standard library.
* Make InterpolatedString conform to ordering requirementMartin Odersky2016-09-241-8/+6
| | | | Arrange its sub-elements so that they appear strictly left to right.
* Swap order of elements in AnnotatedMartin Odersky2016-09-241-1/+1
| | | | | | | | | Now it's annotated first, annotation second. This is in line with AnnotatedType and in line with the principle that tree arguments should come in the order they are written. The reason why the order was swapped before is historical - Scala2 did it that way.
* Make positions fit for metaMartin Odersky2016-09-241-0/+1
| | | | | | | | | | | | | | | | | | In particular: - get rid of envelope, it's too complicated and hides too many errors - check that everywhere in parsed trees the position range of a parent node contains the position ranges of its children. - check that all non-empty trees coming from parser have positions. The commit contains lots of fixes to make these checks pass. In particular, it changes the scheme how definitions are positioned. Previously the position of a definition was the token range of the name defined by it. That does obviously not work with the parent/children invariant. Now, the position is the whole definition range, with the point at the defined name (care is taken to not count backticks). Namer is changed to still use the token range of defined name as the position of the symbol.
* Don't omit scala. from fullNameString.Martin Odersky2016-08-161-1/+1
| | | | | | | The previous fix was too drastic, as it would also have omitted scala, Prefef and other "unqualified owner types" from full names. We now omit only "empty prefixes", i.e. roots, anonymous classes and repl qualifiers.
* Don't print $ suffixes of module classesMartin Odersky2016-08-161-1/+4
| | | | ... when printing using RefinedPrinter. PlainPrinter will still show them.
* Don't print REPL prefixes.Martin Odersky2016-08-161-0/+4
| | | | | This was already disabled when printing types. Now is also disabled when printing fully qualified names.
* Don't disambiguate aliasesMartin Odersky2016-08-161-11/+11
| | | | | | | | | | | | | | Don't disambiguate in situations like Predef.String vs java.lang.String where one Symbol is an alias of another with the same name. Also, fix reviewer comments wrt comments and unused defs.
* Catch exceptions only in i-interpolator.Martin Odersky2016-08-162-6/+2
| | | | | | Normal show will propagate the excpetions. Previously, exceptions were filtered in both cases, which was redundant. Also, it's good to have a way to show things that does not mask exceptions, if only to debug problems in show itself.
* New string infterpolatorsMartin Odersky2016-08-165-97/+211
| | | | | | Roll `sm` and `i` into one interpolator (also called `i`) Evolve `d` to `em` interpolator (for error messages) New interpolator `ex` with more explanations, replaces disambiguation.
* Tweaks to printingMartin Odersky2016-07-211-1/+1
| | | | | - increase page width - print scopes more legibly under -verbose
* Refine printing of tuple an function types with wildcardsMartin Odersky2016-07-191-3/+3
|
* Merge pull request #1343 from dotty-staging/change-hk-direct2odersky2016-07-152-67/+68
|\ | | | | Direct representation of higher-kinded types
| * Drop compareAliasedRefinedMartin Odersky2016-07-111-1/+1
| | | | | | | | | | | | | | | | If there is a new named type param scheme it will almost certainly not need something like compareAliasedRefined. Also: harden printer to compute less and thereby avoid a possible NPE.
| * Fix bug in printing untyped New nodes.Martin Odersky2016-07-111-1/+5
| | | | | | | | Printed as <notype> before.
| * Remove refinement encoding of hk typesMartin Odersky2016-07-112-32/+0
| | | | | | | | | | | | | | | | | | | | Remove the code that implemented the encoding of hk types using refinements. Drop the notion that RefinedTypes can be type parameters. This is no longer true under the new representation. Also, refactoring MemberBinding -> TypeParamInfo
| * Fixes for printing under -Ytest-picklerMartin Odersky2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | - Make printing package ids more robost Crashed before when printers were turned on during test pickling mode. - Make Denotation#bringForward more robost Assertion failed before when printers were turned on during test pickling mode.
| * Handle WildcardType in liftToClassesMartin Odersky2016-07-111-1/+1
| |
| * Refactoring of PolyType and TypeLambdaMartin Odersky2016-07-111-1/+1
| | | | | | | | | | | | | | Make them each inherit from common BaseType GenericType. That way we avoid inheriting accidentally stuff from PolyType in TypeLambda. Also, Fix adaptation of type lambdas. Don't confuse them with PolyTypes.
| * Fix printing of type lambda trees and typesMartin Odersky2016-07-112-3/+5
| |
| * Start new, direct HK schemeMartin Odersky2016-07-112-29/+35
| | | | | | | | | | - Re-introduce newHK option. Label some things that will be removed with OLD.
| * Remove old hk schemeMartin Odersky2016-07-112-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Simplify RefinedType - Drop recursive definition of RefinedThis - this is now taken over by RecType. - Drop RefinedThis. - Simplify typeParams The logic avoiding forcing is no longer needed. - Remove unused code and out of date comments.
| * Make TypeAccumulators follow LazyRefsMartin Odersky2016-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeMaps do the same, so it is logical, and helps prevent subtle errors as when we mispredicted whether a RecType contains references that point to it. Also, add normalizeHkApply to homogenize Fixes some discrepancies in Tasty typing. Also, homogenize skolem types Skolem types are eliminated by pickling, so they should not appear in the "before-pickling" output.
| * Multiple fixesMartin Odersky2016-07-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Swap order of tests in lookupRefined - Change joins of BindingKinds. A type parameter joint with a normal refinement represents a type parameter that has been filled in. So the Binding attribute should be removed. - Fix printing of type lambdas under new hk scheme - refine isRef for hk type The new definition avoids that a higher-kinded type "isRef" of an underlying class. I.e. `[X] -> Any` is not longer a ref to `Any`. - Fix withBindingKind for type aliases Old definition converted aliases to type bounds. - Multiple fixes to BetaReduce - Fix logic for hk subtype tests - Make isHK more precise
| * Turn on new hk schemeMartin Odersky2016-07-112-2/+3
| | | | | | | | | | | | | | For the moment under newHK flag. - avoid crasher in derivedTypeParams (NamedTypes don't always have symbols) - Revise logic in type comparer for new HK scheme