Created
June 13, 2019 13:27
-
-
Save joseoliv/e32e48c97ecb566f45587b4271145623 to your computer and use it in GitHub Desktop.
eval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotation 'eval' is an expression that returns the value | |
returned by the attached DLS that is in interpreted Cyan | |
*} | |
object Eval | |
func run { | |
var Int sum = @eval("cyan.lang", "Int"){* | |
var Int count = 0; | |
for n in 1..10 { | |
count = count + n | |
} | |
return count; | |
*}; | |
assert sum == 55; | |
} | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment