Skip to content

Instantly share code, notes, and snippets.

@chiquitinxx
Last active August 29, 2015 14:11
Show Gist options
  • Save chiquitinxx/ce31042741e8726ba6c1 to your computer and use it in GitHub Desktop.
Save chiquitinxx/ce31042741e8726ba6c1 to your computer and use it in GitHub Desktop.
GsNative example
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