unittests #9
| @@ -299,6 +299,7 @@ error_t *lexer_next_number(lexer_t *lex, lexer_token_t *token) { | |||||||
|         token->explanation = |         token->explanation = | ||||||
|             "Number length exceeds the maximum of 128 characters"; |             "Number length exceeds the maximum of 128 characters"; | ||||||
|     } |     } | ||||||
|  |     lex->character_number += n; | ||||||
|     so_far += n; |     so_far += n; | ||||||
|     if (n == 0) { |     if (n == 0) { | ||||||
|         token->id = TOKEN_ERROR; |         token->id = TOKEN_ERROR; | ||||||
| @@ -328,10 +329,11 @@ error_t *lexer_next_number(lexer_t *lex, lexer_token_t *token) { | |||||||
|             token->id = TOKEN_ERROR; |             token->id = TOKEN_ERROR; | ||||||
|             token->explanation = |             token->explanation = | ||||||
|                 "Number length exceeds the maximum of 128 characters"; |                 "Number length exceeds the maximum of 128 characters"; | ||||||
|  |         } else { | ||||||
|  |             lex->character_number += suffix_length; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     lex->character_number += n; |  | ||||||
|     token->value = strdup(buffer); |     token->value = strdup(buffer); | ||||||
|     return nullptr; |     return nullptr; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user