shithub: lpa

ref: 7d2f1a2d83df21f0520180537eba7f930bbdb7ee
dir: /value.c/

View raw version
#include <u.h>
#include <libc.h>
#include <thread.h>

#include "dat.h"
#include "fns.h"

/* Anything that can have a name in LPA: Arrays, functions, ... */
char *
printval(void *v)
{
	if(v)
		return smprint("some value: %p :)", v);
	else
		return smprint("no value :(");
}

void *
parseval(char *buf, char **errp)
{
	void *val = nil;
	TokenList *tokens = scan(buf, errp);
	if(tokens != nil){
		/* Parse the tokens as a constant. TODO: Support function definitions as well... */
		val = parseaplan(tokens, errp);
	}
	return val;
}

void *
init_quadio(void)
{
	return nil;
}