|
| void | ps_tstream_init (struct ps_tstream *ts, const struct ps_token_arr *tokens, const struct ps_file_ctx *file_ctx) |
| | Points tstream to the first token in tokens and reads from it there on.
|
| |
| bool | ps_tstream_is_eof (struct ps_tstream *ts) |
| | Whether tstream has no more tokens.
|
| |
| struct ps_token * | ps_tstream_current (struct ps_tstream *ts) |
| | The current token in tstream.
|
| |
| void | ps_tstream_advance_n (struct ps_tstream *ts, isize n) |
| | Advances tstream to its nth next token.
|
| |
| struct ps_token * | ps_tstream_peek (struct ps_tstream *ts, usize n, enum ps_token_type type) |
| | If the nth next token in ts is of the given type, returns it.
|
| |
| struct ps_token * | ps_tstream_match (struct ps_tstream *ts, enum ps_token_type type, STR ctx) |
| | Attempts to match the next token with the given token type.
|
| |
| struct ps_token * | ps_tstream_match_any (struct ps_tstream *ts, enum ps_token_type types[], usize count, STR ctx) |
| | Attempts to match the next token with one of the given token types.
|
| |
Token stream processing.
- Copyright
- Copyright (C) 2023 Ethan Uppal. All rights reserved.
- Author
- Ethan Uppal
Definition in file tstream.h.