Rename error_offset to error_offset_within_token

Hopefully clarify the role of this variable.
This commit is contained in:
ridiculousfish
2019-11-08 16:55:54 -08:00
parent ef8b5e4fa0
commit 896ef65f8c
4 changed files with 9 additions and 8 deletions

View File

@@ -634,7 +634,7 @@ static void test_tokenizer() {
do_test(token.has_value());
do_test(token->type == token_type_t::error);
do_test(token->error == tokenizer_error_t::unterminated_escape);
do_test(token->error_offset == 3);
do_test(token->error_offset_within_token == 3);
}
{
@@ -646,7 +646,7 @@ static void test_tokenizer() {
do_test(token->type == token_type_t::error);
do_test(token->error == tokenizer_error_t::closing_unopened_subshell);
do_test(token->offset == 4);
do_test(token->error_offset == 0);
do_test(token->error_offset_within_token == 0);
}
{
@@ -657,7 +657,7 @@ static void test_tokenizer() {
do_test(token.has_value());
do_test(token->type == token_type_t::error);
do_test(token->error == tokenizer_error_t::unterminated_subshell);
do_test(token->error_offset == 4);
do_test(token->error_offset_within_token == 4);
}
{
@@ -668,7 +668,7 @@ static void test_tokenizer() {
do_test(token.has_value());
do_test(token->type == token_type_t::error);
do_test(token->error == tokenizer_error_t::unterminated_slice);
do_test(token->error_offset == 4);
do_test(token->error_offset_within_token == 4);
}
// Test some redirection parsing.