Rework if/elif/else/endif extraction

This commit is contained in:
Tamas Vajk
2021-01-27 09:24:25 +01:00
parent 72547b89e6
commit 1ab4af275d
8 changed files with 76 additions and 77 deletions

View File

@@ -346,28 +346,21 @@ directive_ifs(
directive_elifs(
unique int id: @directive_elif,
int branchTaken: int ref, /* 0: false, 1: true */
int conditionValue: int ref); /* 0: false, 1: true */
int conditionValue: int ref, /* 0: false, 1: true */
int parent: @directive_if ref,
int index: int ref);
directive_elses(
unique int id: @directive_else,
int branchTaken: int ref); /* 0: false, 1: true */
directive_endifs(
unique int id: @directive_endif);
#keyset[start, end]
directive_if_endif(
unique int start: @directive_if ref,
unique int end: @directive_endif ref);
@directive_if_sibling = @directive_else | @directive_elif;
#keyset[start, index]
directive_if_siblings(
int start: @directive_if ref,
int sibling: @directive_if_sibling ref,
int branchTaken: int ref, /* 0: false, 1: true */
int parent: @directive_if ref,
int index: int ref);
#keyset[id, start]
directive_endifs(
unique int id: @directive_endif,
unique int start: @directive_if ref);
directive_define_symbols(
unique int id: @define_symbol_expr ref,
string name: string ref);