Skip to content
Snippets Groups Projects
Commit d240d71b authored by Niels Möller's avatar Niels Möller
Browse files

(sexp_check_token): Removed check for "any" token.

All callers specify the token they expect.
(sexp_parse): Pass on comment tokens.

Rev: nettle/tools/parse.c:1.2
parent bb4a4628
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ sexp_check_token(struct sexp_parser *parser, ...@@ -72,7 +72,7 @@ sexp_check_token(struct sexp_parser *parser,
parser->transport ? SEXP_CANONICAL : parser->mode, parser->transport ? SEXP_CANONICAL : parser->mode,
string); string);
if (token && parser->input->token != token) if (parser->input->token != token)
die("Syntax error.\n"); die("Syntax error.\n");
} }
...@@ -141,6 +141,10 @@ sexp_parse(struct sexp_parser *parser, ...@@ -141,6 +141,10 @@ sexp_parse(struct sexp_parser *parser,
token->type = SEXP_STRING; token->type = SEXP_STRING;
goto check_transport_end; goto check_transport_end;
case SEXP_COMMENT:
token->type = SEXP_COMMENT;
return;
case SEXP_TRANSPORT_START: case SEXP_TRANSPORT_START:
if (parser->mode == SEXP_CANONICAL) if (parser->mode == SEXP_CANONICAL)
die("Base64 not allowed in canonical mode.\n"); die("Base64 not allowed in canonical mode.\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment