avoid a segfault on getting the token position
This commit is contained in:
parent
ce387d81b6
commit
41d4be4b84
1 changed files with 7 additions and 3 deletions
|
|
@ -690,9 +690,13 @@ HParseResult *h_lr_parse(HAllocator* mm__, const HParser* parser, HInputStream*
|
|||
value->seq->elements[len-1-i] = v;
|
||||
value->seq->used++;
|
||||
}
|
||||
if(v) {
|
||||
// result position equals position of left-most symbol
|
||||
value->index = v->index;
|
||||
value->bit_offset = v->bit_offset;
|
||||
} else {
|
||||
// XXX how to get the position in this case?
|
||||
}
|
||||
|
||||
// perform token reshape if indicated
|
||||
if(symbol->reshape)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue