diff --git a/libs/pproc/src/pproc_directive.c b/libs/pproc/src/pproc_directive.c index 5387920..550bfda 100644 --- a/libs/pproc/src/pproc_directive.c +++ b/libs/pproc/src/pproc_directive.c @@ -55,10 +55,10 @@ void scc_pproc_parse_macro_arguments(scc_lexer_tok_ring_t *ring, int ok; do { scc_ring_next_consume(*ring, tok, ok); + // ok = scc_lexer_next_non_blank(ring, &tok); if (!ok) { return; } - // scc_lexer_next_non_blank(ring, &tok); if (tok.type == SCC_TOK_R_PAREN) { depth--; } diff --git a/libs/pproc/src/pproc_expand.c b/libs/pproc/src/pproc_expand.c index eb5b4e7..5c7f5f4 100644 --- a/libs/pproc/src/pproc_expand.c +++ b/libs/pproc/src/pproc_expand.c @@ -109,7 +109,7 @@ void scc_pproc_expand_by_src(scc_pproc_macro_table_t *macro_table, scc_pproc_parse_macro_arguments(input, &expaned_buffer, true); } while (1) { - scc_ring_peek(*input, tok, ok); + ok = scc_lexer_peek_non_blank(input, &tok); if (ok == false) { break; } @@ -288,7 +288,7 @@ static void rescan(scc_pproc_expand_t *expand_ctx, int ok = false; scc_lexer_tok_t tok; - scc_ring_peek(*expand_ctx->input, tok, ok); + ok = scc_lexer_peek_non_blank(expand_ctx->input, &tok); if (ok && tok.type == SCC_TOK_L_PAREN) { scc_lexer_tok_vec_t expaned_buffer; scc_vec_init(expaned_buffer); diff --git a/libs/pproc/tests/test_pproc_unit.c b/libs/pproc/tests/test_pproc_unit.c index d505fdd..4750f40 100644 --- a/libs/pproc/tests/test_pproc_unit.c +++ b/libs/pproc/tests/test_pproc_unit.c @@ -568,7 +568,7 @@ static void test_c99_docs(void) { "\t\t\tt(10,,), t(,11,), t(,,12), t(,,) };\n", "int j[] = { 123, 45, 67, 89,\n" - "\t\t\t10, 11, 12, };\n"); + "\t\t\t10, 11, 12, };\n"); TEST_CASE("EXAMPLE 6 To demonstrate the redefinition rules, the following " "sequence is valid.");