#include <stdio.h>
#include <string.h>
-// Make the scope character ('.') be a symbol, otherwise it's just
-// a ident character
-#define USE_SCOPE_CHAR 0
-
#define DEBUG 0
#define ARRAY_SIZE(x) ((sizeof(x))/(sizeof((x)[0])))
{TOK_RWD_FUNCTION, "function"},
{TOK_RWD_RETURN, "return"},
+ {TOK_RWD_BREAK, "break"},
+ {TOK_RWD_CONTINUE, "continue"},
{TOK_RWD_NEW, "new"},
{TOK_RWD_IF, "if"},
{TOK_RWD_WHILE, "while"},
{TOK_RWD_FOR, "for"},
+ {TOK_RWD_NULL, "null"},
{TOK_RWD_VOID, "void"},
{TOK_RWD_OBJECT, "Object"},
{TOK_RWD_OPAQUE, "Opaque"},
if( isdigit(*File->CurPos) )
{
ret = TOK_INTEGER;
- if( *File->CurPos == '0' && File->CurPos[1] == 'x' ) {
+ if( *File->CurPos == '0' && File->CurPos[1] == 'x' )
+ {
File->CurPos += 2;
while(('0' <= *File->CurPos && *File->CurPos <= '9')
|| ('A' <= *File->CurPos && *File->CurPos <= 'F')
File->CurPos ++;
}
}
- else {
+ else
+ {
while( isdigit(*File->CurPos) )
File->CurPos ++;
+// printf("*File->CurPos = '%c'\n", *File->CurPos);
+
// Decimal
if( *File->CurPos == '.' )
{
while( isdigit(*File->CurPos) )
File->CurPos ++;
}
+
+// printf(" ret = %i\n", ret);
}
break;
}