Last active
August 29, 2015 14:11
-
-
Save chiquitinxx/ce31042741e8726ba6c1 to your computer and use it in GitHub Desktop.
GsNative example
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
import org.grooscript.asts.GsNative | |
class A { | |
def b = 6 | |
static c = 7 | |
@GsNative | |
def a() {/* | |
//This js code is inserted in the javascript conversion | |
//You can use gSobject better than this | |
gSobject.test(gSobject.b, 6); | |
this.test(A.c, 7); | |
//You can use gSobject better than this | |
A().test(7, 7); | |
return 5; | |
*/} | |
def test(first, second) { | |
assert first == second | |
} | |
} | |
assert new A().a() == 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment