Add the ability to parse types.
This ability is not integrated with the rest of the parser - in fact, the grammar for things like function declarations (where type declarations are necessary) is not yet determined.
This commit is contained in:
@@ -62,6 +62,7 @@ enum libab_lexer_token_e {
|
||||
TOKEN_KW_ELSE,
|
||||
TOKEN_KW_WHILE,
|
||||
TOKEN_KW_DO,
|
||||
TOKEN_KW_ARROW,
|
||||
TOKEN_LAST
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "table.h"
|
||||
#include "ll.h"
|
||||
#include "tree.h"
|
||||
#include "parsetype.h"
|
||||
|
||||
/**
|
||||
* The parser that is used by libabacus
|
||||
@@ -31,6 +32,8 @@ void libab_parser_init(libab_parser* parser, libab_table* table);
|
||||
*/
|
||||
libab_result libab_parser_parse(libab_parser* parser, ll* tokens,
|
||||
const char* string, libab_tree** store_into);
|
||||
libab_result libab_parser_parse_type(libab_parser* parser, ll* tokens,
|
||||
const char* string, libab_parsetype** store_into);
|
||||
/**
|
||||
* Releases the resources allocated by the parser.
|
||||
* @param parser the parser to release.
|
||||
|
||||
Reference in New Issue
Block a user