Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2t-dev] [MTL] Blocks and init sections

Hi Laurent,
See intermixed.

2008/8/18 Laurent Goubet <laurent.goubet@xxxxxxx>:
> Hi Arjan,
>
> I have trouble understanding the expected way to handle InitSections
> throughout MTL. The spec defines an "initSection" reference on the meta-type
> Block, yet those are never mentionned in the grammar save for ForBlocks and
> Templates.
>
> From the meta-model described in the specifications, I would have expected
> init sections to be useable on all blocks (if, let, file, query, macro,
> ...). Were they really meant to be accessible on for and template only?

No, you are right. It is meant to be useable on all blocks. We need to
fix the grammar.

>
> As a side note, what is the expected scope of these init sections?

Body of the block.

> For example, can they be used in the declaration of the for's "iteration"
> expression or only in the body of the for block?

As per spec only in the body of a block.

> Along the same line and
> regardless of the answer of the former, can the variables declared in the
> init section be used in the "each" expression of the for since that can be
> considered part of the body?

At the moment we do not consider "each" a part of the body. It is meant to
be executed between iterations, so not really considered a part of the body.
Do you feel it should be considered a part of the body? What about
'before' and 'after'?


>
> Regards.
>
> Laurent Goubet
> Obeo
>


Regards, Arjan
> _______________________________________________
> m2t-dev mailing list
> m2t-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2t-dev
>
>


Back to the top