diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-08-22 15:25:54 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-08-22 15:25:54 -0400 |
commit | 3add402da9fc5b574f34e37e951779212ce28ed1 (patch) | |
tree | a081a2331923dce6ee29c87285be901d58b0bc4b /libtnsl/src/reflect | |
parent | 11f9c56ae3861e32ac45785e9f30ed5f4c19ea32 (diff) |
Begin port of tnsl-parse code to native TNSL
Diffstat (limited to 'libtnsl/src/reflect')
-rw-r--r-- | libtnsl/src/reflect/lib.tnsl | 26 | ||||
-rw-r--r-- | libtnsl/src/reflect/type.tnsl | 39 |
2 files changed, 64 insertions, 1 deletions
diff --git a/libtnsl/src/reflect/lib.tnsl b/libtnsl/src/reflect/lib.tnsl new file mode 100644 index 0000000..0688e6f --- /dev/null +++ b/libtnsl/src/reflect/lib.tnsl @@ -0,0 +1,26 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +: extern const {}_library _LIB_TABLE + +; raw struct _library { + +}
\ No newline at end of file diff --git a/libtnsl/src/reflect/type.tnsl b/libtnsl/src/reflect/type.tnsl index d346464..2ed0016 100644 --- a/libtnsl/src/reflect/type.tnsl +++ b/libtnsl/src/reflect/type.tnsl @@ -17,4 +17,41 @@ THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE EXPRESS OR IMPLIED -#/
\ No newline at end of file +#/ + +; raw struct _type_header { + uint + _lib_index, + _type_index, + + ~{}_type_header + _generic_list +} + +; raw struct _method { + ~void + address +} + +; raw struct _type { + ~{}int + _offsets, + + ~{}uint + _super_offsets, + + ~{}_type + _supers, + + ~{}_method + _methods +} + +/; method _type_header + + /; _is (_type_header base) + ;/ + + /; _get_method () + ;/ +;/
\ No newline at end of file |