diff options
| author | Mattias Andrée <m@maandree.se> | 2026-01-05 13:50:38 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-23 07:52:18 +0100 |
| commit | 7dd4970daafdc1992e1dba486a1477a17cb4c53e (patch) | |
| tree | e56e544ec55e68872397738e0e5064b000d31eba /print-syntax.c | |
| parent | Optimise detection of rejection (diff) | |
| download | libparser-7dd4970daafdc1992e1dba486a1477a17cb4c53e.tar.gz libparser-7dd4970daafdc1992e1dba486a1477a17cb4c53e.tar.bz2 libparser-7dd4970daafdc1992e1dba486a1477a17cb4c53e.tar.xz | |
Add committed-operator
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'print-syntax.c')
| -rw-r--r-- | print-syntax.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/print-syntax.c b/print-syntax.c index 1584e7b..3228401 100644 --- a/print-syntax.c +++ b/print-syntax.c @@ -42,6 +42,13 @@ print_sentence(const union libparser_sentence *sentence, int indent) indent += 1; break; + case LIBPARSER_SENTENCE_TYPE_COMMITTED: + printf("+("); + indent = print_sentence(sentence->unary.sentence, indent + 2); + printf(")"); + indent += 1; + break; + case LIBPARSER_SENTENCE_TYPE_OPTIONAL: printf("["); indent = print_sentence(sentence->unary.sentence, indent + 1); |
