inlines with parameters (1)
Inlines with parameters seem not to be supported (yet).
Example from the book ((page 65):
inline example(x, y){
Submitted by Kees Pronk on 22 August 2011 at 18:15
y = a;
x = b;
assert(x));
}
init {
int a, b;
example(a, b);
}
Issue Log
For version 1.0.2, I’ve deleted some checks from the inline construction, because it is allowed to use all kinds of variables there. Later on, I will look into this in more detail to see if I can do some transformation to replace the contents of the Inline definition with the Inline call and then perform the checks.
Inline support is improved in general for the next version (1.0.3). When an inline call is found, a transformation is made on the underlying AST: the inline call is replaced by the inline definition (replacing the formal parameters with the arguments as well). This AST is then used by EpiSpin’s error checking mechanism and analysis is then performed as if the content of the inline definition is at the position of the inline call. When an error is found, the error marker will be displayed in the inline definition.
Log in to post comments