Moved VARIABLE_TYPE to vartype.h. VARIABLE_TYPE functions.

The functions in ubasic.c that used int for variable values and
the function expr() in tokenizer.c now use VARIABLE_TYPE.

Also added a new test in tests.c.
This commit is contained in:
Danyil Bohdan 2013-12-21 23:55:48 +02:00
parent a519c98e6c
commit ea7a52e61f
7 changed files with 83 additions and 30 deletions

View file

@ -30,6 +30,8 @@
#ifndef __TOKENIZER_H__
#define __TOKENIZER_H__
#include "vartype.h"
enum {
TOKENIZER_ERROR,
TOKENIZER_ENDOFINPUT,
@ -69,7 +71,7 @@ enum {
void tokenizer_init(const char *program);
void tokenizer_next(void);
int tokenizer_token(void);
int tokenizer_num(void);
VARIABLE_TYPE tokenizer_num(void);
int tokenizer_variable_num(void);
void tokenizer_string(char *dest, int len);