X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/blobdiff_plain/c9b74def08ff0fcac2f1466652b432e4c3129b35..1893dabd78f6707d07882049997b7c2879bf02b9:/src/scanner.c diff --git a/src/scanner.c b/src/scanner.c index 4792dfd..86e2050 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1078,7 +1078,7 @@ yaml_parser_stale_simple_keys(yaml_parser_t *parser) if (simple_key->required) { return yaml_parser_set_scanner_error(parser, "while scanning a simple key", simple_key->mark, - "could not found expected ':'"); + "could not find expected ':'"); } simple_key->possible = 0; @@ -1118,9 +1118,11 @@ yaml_parser_save_simple_key(yaml_parser_t *parser) if (parser->simple_key_allowed) { - yaml_simple_key_t simple_key = { 1, required, - parser->tokens_parsed + parser->tokens.tail - parser->tokens.head, - { 0, 0, 0 } }; + yaml_simple_key_t simple_key; + simple_key.possible = 1; + simple_key.required = required; + simple_key.token_number = + parser->tokens_parsed + parser->tokens.tail - parser->tokens.head; simple_key.mark = parser->mark; if (!yaml_parser_remove_simple_key(parser)) return 0; @@ -1147,7 +1149,7 @@ yaml_parser_remove_simple_key(yaml_parser_t *parser) if (simple_key->required) { return yaml_parser_set_scanner_error(parser, "while scanning a simple key", simple_key->mark, - "could not found expected ':'"); + "could not find expected ':'"); } } @@ -2072,7 +2074,7 @@ yaml_parser_scan_directive(yaml_parser_t *parser, yaml_token_t *token) if (!IS_BREAKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not found expected comment or line break"); + start_mark, "did not find expected comment or line break"); goto error; } @@ -2126,7 +2128,7 @@ yaml_parser_scan_directive_name(yaml_parser_t *parser, if (string.start == string.pointer) { yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "cannot found expected directive name"); + start_mark, "could not find expected directive name"); goto error; } @@ -2472,7 +2474,7 @@ yaml_parser_scan_tag(yaml_parser_t *parser, yaml_token_t *token) if (!IS_BLANKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not found expected whitespace or line break"); + start_mark, "did not find expected whitespace or line break"); goto error; } @@ -2826,7 +2828,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token, if (!IS_BREAKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not found expected comment or line break"); + start_mark, "did not find expected comment or line break"); goto error; }