fix result bit_length for LR backends

This commit is contained in:
Sven M. Hallberg 2015-09-07 15:37:26 +02:00
parent 4f455aa97e
commit fb5122ec88

View file

@ -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;
} }