| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unliftable is a type class similar to existing Liftable that lets
users to extract custom data types out of trees with the help of
straightforward type ascription syntax:
val q“foo.bar(${baz: Baz})” = ...
This will use Unliftable[Baz] to extract custom data type Baz out of
a tree nested inside of the another tree. A simpler example would be
extracting of constant values:
val q”${x: Int} + ${y: Int}” = q”1 + 2”
|
|
|
|
|
|
|
|
|
|
|
| |
This effectively reconstructs a sequence of enumerators and body
from the tree produced by mkFor. This lets to define bi-directional
SyntacticFor and SyntacticForYield constructors/extractors to work
with for loops.
Correctness of the transformation is tested by a scalacheck test
that generates a sequence of random enumerators, sugars them into
maps/flatMaps/foreach/withFilter calls and reconstructs them back.
|
|
|
|
|
|
| |
Typecheck trees with toolbox and check that they are still matched
by corresponding quasiquote. Fix tuples and function types matchers
to account for different shape of trees after typing.
|
| |
|
| |
|
|
Introduces an extensive ScalaCheck-based test suite for recently
implemented quasiquotes. Provides tools for syntactic tree comparison
and verifying compilation error messages.
|