Start building library

This commit is contained in:
2025-05-23 11:27:32 -04:00
parent f519d3ce29
commit f7ad84a79a
3 changed files with 82 additions and 4 deletions

25
src/lib.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "parser3.h"
#include "weaseljson.h"
extern "C" {
/** Create a parser. Increasing stack size increases memory usage but also
* increases the depth of nested json accepted. `callbacks` and `data` must
* outlive the returned parser. */
__attribute__((visibility("default"))) WeaselJsonParser *
WeaselJsonParser_create(int stackSize, const WeaselJsonCallbacks *callbacks,
void *data) {}
/** Restore the parser to its newly-created state */
__attribute__((visibility("default"))) void
WeaselJsonParser_reset(WeaselJsonParser *parser) {}
/** Destroy the parser */
__attribute__((visibility("default"))) void
WeaselJsonParser_destroy(WeaselJsonParser *parser) {}
/** Incrementally parse `len` more bytes starting at `buf`. `buf` may be
* modified. Call with `len` 0 to indicate end of data */
__attribute__((visibility("default"))) WeaselJsonStatus
WeaselJsonParser_parse(WeaselJsonParser *parser, char *buf, int len) {}
}