[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[m2t-dev] [backend] About Functions
|
Hi all,
I was looking at the backend and how expressions and operations were
handled and was wondering if some functionalities were accessible.
I am currently trying to instantiate all of the backend expressions and
stumbled upon a use case I can't see a way to solve nicely : let's say
the input language is ambiguous on function calls and allows with the
same sintax to call either a function, or a declared field of the
receiver object (I'm calling "receiver" the object on which the
function is called, your "first parameter"), how can I convert this to a
backend expression (see xpand example below)?
I tried an InvocationOnWhateverExpression, to no avail. And since
InvocationOnWhateverExpression is declared final, I cannot subclass it
to alter the way it behaves when a function of the given name cannot be
retrieved before it simply throws an ExecutionException.
An example of what I am trying to convert for the backend could look
like (in xpand, "name" refers to the name of the NamedElement, not to a
random function) :
DEFINE function FOR uml.NamedElement
«name»
Thanks in advance.
Laurent Goubet
Obeo
PS : As a side note, do you ever visit an IRC chan? I'm idling on
#eclipse and #eclipse-modeling, these discussion might be easier on a chat.
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/">Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard