shithub: libmujs

ref: 3f564db259b89d87cf87ff6691c4ef0f47b55f09
dir: /js.h/

View raw version
#ifndef js_h
#define js_h

#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <setjmp.h>
#include <math.h>

typedef struct js_State js_State;
typedef struct js_StringNode js_StringNode;

typedef int (*js_CFunction)(js_State *J);

js_State *js_newstate(void);
void js_close(js_State *J);

int js_error(js_State *J, const char *fmt, ...);

int js_loadstring(js_State *J, const char *s);
int js_loadfile(js_State *J, const char *filename);

const char *js_intern(js_State *J, const char *s);

void js_printstringtree(js_State *J);

#endif