This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lara:docs:specs3 [2018/05/21 18:07] joaobispo [Joinpoint Actions] |
lara:docs:specs3 [2019/09/22 15:47] (current) |
||
---|---|---|---|
Line 34: | Line 34: | ||
</code> | </code> | ||
- | /* '.exec' is optional, if you suffix the name of the action with parenthesis: */ | + | The keyword '.exec' can be omitted if you prefix the name of the action with the target join point, and add parenthesis: |
- | /* | + | |
- | <code lara> | + | <code lara> |
- | result = $jp.<action_name>(); | + | result = $jp.<action_name>(); |
- | </code> | + | </code> |
- | */ | + | |
/* (recommended syntax: $jp.exec <action_name>. Could it be $jp.action <action_name> instead?) */ | /* (recommended syntax: $jp.exec <action_name>. Could it be $jp.action <action_name> instead?) */ | ||
Line 59: | Line 58: | ||
===== Aspect Calls ===== | ===== Aspect Calls ===== | ||
- | (recommended syntax: var a = new Aspect(); call a;) | + | Previous syntax: |
+ | |||
+ | <code lara> | ||
+ | call result : AnAspect(); | ||
+ | </code> | ||
+ | |||
+ | |||
+ | New syntax: | ||
+ | |||
+ | <code lara> | ||
+ | var result = call AnAspect(); | ||
+ | </code> | ||
===== Tools ('run') ===== | ===== Tools ('run') ===== | ||
Line 92: | Line 103: | ||
Add joinpoints specifically for direct children selection. 'select function.stmt' selects all statements, 'select function.childStmt' selects only the direct children of the function. | Add joinpoints specifically for direct children selection. 'select function.stmt' selects all statements, 'select function.childStmt' selects only the direct children of the function. | ||
+ | |||
+ | |||
+ | /* | ||
+ | |||
==== Insert Order ==== | ==== Insert Order ==== | ||
Line 130: | Line 145: | ||
'after_1' | 'after_1' | ||
| | ||
+ | */ | ||
| | ||
+ | /* | ||
+ | |||
==== String Literals ==== | ==== String Literals ==== | ||
+ | |||
+ | |||
Currently, the preferred way to do String literals in LARA is to use quotes: | Currently, the preferred way to do String literals in LARA is to use quotes: | ||
Line 143: | Line 163: | ||
We can 1) normalize on the LARAC side and escape the quote or 2) identify the type of String (' or ") and generate code accordingly | We can 1) normalize on the LARAC side and escape the quote or 2) identify the type of String (' or ") and generate code accordingly | ||
+ | */ | ||
==== 'exit' Joinpoint in 'scope'/'body' ==== | ==== 'exit' Joinpoint in 'scope'/'body' ==== |