xo-reader2 stack: expand symbol table to store typedefs
+ typedef utest + misc qol policy choices
This commit is contained in:
parent
54ec84fd49
commit
fc25a17262
109 changed files with 2139 additions and 345 deletions
|
|
@ -111,8 +111,8 @@ namespace xo {
|
|||
static Token comma_token() { return Token(tokentype::tk_comma); }
|
||||
/** token representing colon @c ":" **/
|
||||
static Token colon_token() { return Token(tokentype::tk_colon); }
|
||||
/** token representing double-colo @c "::" **/
|
||||
static Token doublecolon() { return Token(tokentype::tk_doublecolon); }
|
||||
/** token representing double-colon @c "::" **/
|
||||
static Token doublecolon_token() { return Token(tokentype::tk_doublecolon); }
|
||||
/** token representing semicolon @c ";" **/
|
||||
static Token semicolon_token() { return Token(tokentype::tk_semicolon); }
|
||||
/** token representing single-assignment @c "=" (editor bait: equal_token) **/
|
||||
|
|
@ -138,6 +138,8 @@ namespace xo {
|
|||
static Token type() { return Token(tokentype::tk_type); }
|
||||
/** token representing keyword @c def **/
|
||||
static Token def_token() { return Token(tokentype::tk_def); }
|
||||
/** token representing keyword @c deftype **/
|
||||
static Token deftype_token() { return Token(tokentype::tk_deftype); }
|
||||
/** token representing keyword @c lambda **/
|
||||
static Token lambda_token() { return Token(tokentype::tk_lambda); }
|
||||
/** token representing keyword @c if **/
|
||||
|
|
|
|||
|
|
@ -146,6 +146,9 @@ namespace xo {
|
|||
/** keyword @c 'def' **/
|
||||
tk_def,
|
||||
|
||||
/** keyword @c 'deftype' **/
|
||||
tk_deftype,
|
||||
|
||||
/** keyword @c 'lambda' **/
|
||||
tk_lambda,
|
||||
|
||||
|
|
|
|||
|
|
@ -591,6 +591,8 @@ namespace xo {
|
|||
tk_type = tokentype::tk_type;
|
||||
} else if (tk_text == "def") {
|
||||
tk_type = tokentype::tk_def;
|
||||
} else if (tk_text == "deftype") {
|
||||
tk_type = tokentype::tk_deftype;
|
||||
} else if (tk_text == "lambda") {
|
||||
tk_type = tokentype::tk_lambda;
|
||||
} else if (tk_text == "if") {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace xo {
|
|||
|
||||
CASE(tk_type);
|
||||
CASE(tk_def);
|
||||
CASE(tk_deftype);
|
||||
CASE(tk_lambda);
|
||||
CASE(tk_if);
|
||||
CASE(tk_then);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue