This file contains hidden or 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
Rem | |
bbdoc: Invoke the method. If an exception is passed, its internal pointer must be Null. | |
returns: A mono object containing the return data, or Null if an exception is thrown. | |
End Rem | |
Method Invoke:TMonoObject(obj:TMonoObject, params:Byte Ptr[], exception:TMonoObject) | |
Return InvokeByPointer(obj._pointer, params, exception) | |
End Method | |
Rem |
This file contains hidden or 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
' lua_test.bmx | |
Strict | |
Import Axe.Lua | |
' Available to lua | |
Function lua_KeyHit( lvm@ Ptr ) | |
' Get the number of arguments to the function |
This file contains hidden or 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
' test.bmx | |
Type Foo {expose} | |
Method Bazzle( obj:Bar ) | |
If obj = Null Then | |
Print "Null obj" | |
Else | |
Print obj.ToString() | |
EndIf |
This file contains hidden or 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
IDENTIFIER_REGEX=/[a-zA-Z_]\w*/ | |
TYPENAME_REGEX=/(?ix) | |
# type shortcut | |
(?: | |
( [!#%] | @{1,2} | \$[zw]? ) | |
| | |
: \s* ([a-zA-Z_]\w*) | |
) | |
# pointer |
This file contains hidden or 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
# BBDocugen - BlitzMax Documentation Generator | |
# Copyright (C) 2009 Noel Cower | |
# | |
# BBDocugen is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# BBDocugen is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or 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
// ignore this, just include bits as usual | |
#import <list> | |
#import <stdint.h> | |
// this is just an example class, don't read too much into it | |
class Object | |
{ | |
private: | |
uint32_t m_refs; | |
This file contains hidden or 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
#include <stdio.h> | |
#include "test.h" | |
int main(int argc, char ** argv) | |
{ | |
int i = globalVariable; | |
globalVariable = 50; | |
This file contains hidden or 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
Last login: Tue Apr 7 02:56:43 on ttys002 | |
/Users/noel/Source/Misc/bmax/lua-reflection/test ; exit; | |
[noel@Ouroboros ~]$ /Users/noel/Source/Misc/bmax/lua-reflection/test ; exit; | |
~>Unhandled Exception:Not handling this shit | |
~> | |
t | |
~>StackTrace{ | |
~>@/Users/noel/Source/Misc/bmax/lua-reflection/test.bmx<26,1> | |
~>Function test | |
~>Global Running:Int=1 |
This file contains hidden or 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
SuperStrict | |
Function Script_Require:Int( lvm:Byte Ptr ) | |
Local fname:String | |
While lua_gettop(lvm) > 0 | |
fname = lua_tostring(lvm, -1) | |
lua_settop(lvm, -2) | |
If Not fname Then Throw "Invalid argument to require - nil" | |
If FileType(fname) <> FILETYPE_FILE Then Throw "Script ~q"+fname+"~q does not exist" | |
If lual_dofile(lvm, fname) Then Throw "Error executing script ~q"+fname+"~q: "+lua_tostring(lvm, -1) |
This file contains hidden or 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
Function script_binor:Int(lvm:Byte Ptr) | |
Local result:Int = 0 | |
While lua_gettop(lvm) | |
result :| lua_tointeger(lvm, -1) | |
lua_settop(lvm,-2) | |
Wend | |
lua_pushinteger(lvm, result) | |
Return 1 | |
End Function |
OlderNewer