From 94f1a11f152a085e2decdfdffcda2316da01ea6c Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 18 Mar 2018 19:21:09 -0700 Subject: [PATCH] Replace C++-style comments with C90 compatible ones. --- src/lexer.c | 2 +- src/parser.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lexer.c b/src/lexer.c index 9b3fa48..3a2de7a 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -63,7 +63,7 @@ int _lexer_foreach_convert_match(void* data, va_list args) { struct lexer_state* state = va_arg(args, struct lexer_state*); char first_char = state->source[match->from]; if(isspace(first_char)) { - // Skip + /* Skip */ } else if(first_char == '\n') { state->line++; state->line_from = match->to; diff --git a/src/parser.c b/src/parser.c index 570d1cb..e3f844c 100644 --- a/src/parser.c +++ b/src/parser.c @@ -19,7 +19,7 @@ struct operator_data { int precedence; }; -// Utilities +/* Utilities */ #define PARSE_CHILD(result, state, parse_function, parse_into, into) do {\ result = parse_function(state, &parse_into);\ if(result == LIBAB_SUCCESS) {\ @@ -48,7 +48,7 @@ libab_result _parser_extract_token(struct parser_state* state, char** into, liba return libab_copy_string_range(into, state->string, match->from, match->to); } -// State functions +/* State functions */ void _parser_state_update(struct parser_state* state) { state->current_match = state->current_node ? state->current_node->data : NULL; if(state->current_match) state->last_match = state->current_match; @@ -109,7 +109,7 @@ libab_result _parser_consume_type(struct parser_state* state, return result; } -// Basic Tree Constructors +/* Basic Tree Constructors */ libab_result _parse_block(struct parser_state*, libab_tree**, int); libab_result _parse_expression(struct parser_state* state, libab_tree** store_into); @@ -745,7 +745,7 @@ libab_result _parser_append_op_node(struct parser_state* state, libab_lexer_matc } -// Expression-specific utility functions +/* Expression-specific utility functions */ int _parser_match_is_op(libab_lexer_match* match) { return match->type == TOKEN_OP ||