Add D example to user guide for p_context_init() - close #16

This commit is contained in:
Josh Holtrop 2024-03-29 13:52:16 -04:00
parent fad7f4fb36
commit 5dfd62b756

View File

@ -646,13 +646,20 @@ structure.
The input to be used for lexing/parsing is passed in when initializing the The input to be used for lexing/parsing is passed in when initializing the
context structure. context structure.
Example: C example:
``` ```
p_context_t context; p_context_t context;
p_context_init(&context, input, input_length); p_context_init(&context, input, input_length);
``` ```
D example:
```
p_context_t context;
p_context_init(&context, input);
```
### `p_parse` ### `p_parse`
The `p_parse()` function is the main entry point to the parser. The `p_parse()` function is the main entry point to the parser.