fix result bit_length for LR backends
This commit is contained in:
parent
4f455aa97e
commit
fb5122ec88
1 changed files with 3 additions and 1 deletions
|
|
@ -351,7 +351,9 @@ HParseResult *h_lrengine_result(HLREngine *engine)
|
||||||
// on top of the stack is the start symbol's semantic value
|
// on top of the stack is the start symbol's semantic value
|
||||||
assert(!h_slist_empty(engine->stack));
|
assert(!h_slist_empty(engine->stack));
|
||||||
HParsedToken *tok = engine->stack->head->elem;
|
HParsedToken *tok = engine->stack->head->elem;
|
||||||
return make_result(engine->arena, tok);
|
HParseResult *res = make_result(engine->arena, tok);
|
||||||
|
res->bit_length = engine->input.index * 8;
|
||||||
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue