Version 2 by komaz
on Nov 22, 2010 15:33.

compared with
Version 3 by komaz
on Nov 22, 2010 15:38.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History

Therefore, the most obvious way to use DSL expressions is instantiation of some complex objects. For example, imagine we are writing a library for graph manipulation, so we define classes like {{Graph}}, {{Node}}, and {{Edge}}. See [^Graphs.fan]
and And imagine that we need to instantiate some graphs for our tests, so we write the code like this:
{noformat}
a := Node("a")
{noformat}

The complete source code for example above can be found here.
The source code of DSL plugin can be found [here|^GraphDsl.fan].

Uh,
So I thought - nice feature, but rarely needed, also the compiler API operates on a quite low-level, so that even simple constructor invocation requires too many code.