changes from tutorial: add h_literal, make h_make_bytes more practical

This commit is contained in:
Meredith L. Patterson 2015-05-04 19:00:37 -04:00
parent 33af1ec65c
commit 39c9096fd6
3 changed files with 6 additions and 4 deletions

View file

@ -268,6 +268,8 @@ HAMMER_FN_DECL(HParseResult*, h_parse, const HParser* parser, const uint8_t* inp
*/
HAMMER_FN_DECL(HParser*, h_token, const uint8_t *str, const size_t len);
#define h_literal(s) h_token(s, sizeof(s)-1)
/**
* Given a single character, returns a parser that parses that
* character.