diff options
author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-04-25 13:29:11 +0200 |
---|---|---|
committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-04-25 14:19:55 +0200 |
commit | ff615fc81ac67b52812dde6e08028018e233373c (patch) | |
tree | 4bc61cbf25fc701fc7528216b2a2f5f5c5b42eff /examples | |
parent | b5b67207e6459e129368c13a8069359a74b503f1 (diff) |
Make it possible to extract information about methods
Change-Id: Id4faec0c4b540ef040043b1c76ae07e628a29c0e
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/method-info.qs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/method-info.qs b/examples/method-info.qs new file mode 100644 index 0000000..1d8da56 --- /dev/null +++ b/examples/method-info.qs @@ -0,0 +1,12 @@ +var fun = editors.current().currentFunction() +console.log("Name: " + fun.name) +console.log("Return Type: " + fun.returnType) +console.log("Arguments: " + fun.arguments.length) +for ( var i = 0; i < + fun.arguments.length; i++ ) { + var arg = fun.arguments[i] + console.log(" Argument: name:" + arg.name + " type:" + arg.type + " initializer: " + arg.initializer) +} +console.log("isVirtual=" + fun.isVirtual + " isOverride=" + fun.isOverride ++ " isFinal=" + fun.isFinal + " isVariadic=" + fun.isVariadic + " isConst=" ++ fun.isConst + " isVolatile=" + fun.isVolatile + " isPureVirtual=" + +fun.isPureVirtual) |