New config working for config.4coder, still needs error messages and error recovery.
This commit is contained in:
parent
3bfd3e7868
commit
b4607ec3ad
|
@ -197,6 +197,7 @@ config_parser__assignment(Config_Parser *ctx){
|
||||||
require(config_parser__match_token(ctx, CPP_TOKEN_EQ));
|
require(config_parser__match_token(ctx, CPP_TOKEN_EQ));
|
||||||
Config_RValue *r = config_parser__rvalue(ctx);
|
Config_RValue *r = config_parser__rvalue(ctx);
|
||||||
require(r != 0);
|
require(r != 0);
|
||||||
|
require(config_parser__match_token(ctx, CPP_TOKEN_SEMICOLON));
|
||||||
|
|
||||||
Config_Assignment *assignment = push_array(ctx->arena, Config_Assignment, 1);
|
Config_Assignment *assignment = push_array(ctx->arena, Config_Assignment, 1);
|
||||||
assignment->l = l;
|
assignment->l = l;
|
||||||
|
@ -817,7 +818,7 @@ config_parse__data(Partition *scratch,
|
||||||
Cpp_Lex_Result result = cpp_lex_step(&S, data.str, data.size + 1, HAS_NULL_TERM, &array, NO_OUT_LIMIT);
|
Cpp_Lex_Result result = cpp_lex_step(&S, data.str, data.size + 1, HAS_NULL_TERM, &array, NO_OUT_LIMIT);
|
||||||
|
|
||||||
if (result == LexResult_Finished){
|
if (result == LexResult_Finished){
|
||||||
#if 0
|
#if 1
|
||||||
Config *parsed = config_parse(scratch, file_name, data, array);
|
Config *parsed = config_parse(scratch, file_name, data, array);
|
||||||
if (parsed != 0){
|
if (parsed != 0){
|
||||||
success = true;
|
success = true;
|
||||||
|
|
Loading…
Reference in New Issue