Skip to content

Commit

Permalink
feat: add more DaedalusScript APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Sep 14, 2024
1 parent 7573f68 commit a5d1549
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/zenkit-capi/DaedalusScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,11 @@ ZKC_API ZkDaedalusDataType ZkDaedalusSymbol_getReturnType(ZkDaedalusSymbol const

ZKC_API ZkDaedalusInstanceType ZkDaedalusInstance_getType(ZkDaedalusInstance const* slf);
ZKC_API uint32_t ZkDaedalusInstance_getIndex(ZkDaedalusInstance const* slf);

ZKC_API uint32_t ZkDaedalusSymbol_getFileIndex(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getOffsetAsMember(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getLineStart(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getLineCount(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getCharStart(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getCharCount(ZkDaedalusSymbol const* slf);
ZKC_API uint32_t ZkDaedalusSymbol_getClassSize(ZkDaedalusSymbol const* slf);
35 changes: 35 additions & 0 deletions src/DaedalusScript.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,38 @@ uint32_t ZkDaedalusInstance_getIndex(ZkDaedalusInstance const* slf) {
ZKC_CHECK_NULL(slf);
return slf->symbol_index();
}

uint32_t ZkDaedalusSymbol_getFileIndex(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->file_index();
}

uint32_t ZkDaedalusSymbol_getOffsetAsMember(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->offset_as_member();
}

uint32_t ZkDaedalusSymbol_getLineStart(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->line_start();
}

uint32_t ZkDaedalusSymbol_getLineCount(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->line_count();
}

uint32_t ZkDaedalusSymbol_getCharStart(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->char_start();
}

uint32_t ZkDaedalusSymbol_getCharCount(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->char_count();
}

uint32_t ZkDaedalusSymbol_getClassSize(ZkDaedalusSymbol const* slf) {
ZKC_CHECK_NULL(slf);
return slf->class_size();
}

0 comments on commit a5d1549

Please sign in to comment.