forked from GitHub/gf-core
fix in the parser for callbacks in the middle of a word
This commit is contained in:
@@ -1616,6 +1616,8 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym)
|
||||
/* This is the first time when we encounter this
|
||||
* literal category so we must call the callback */
|
||||
|
||||
bool match = false;
|
||||
if (!ps->before->needs_bind) {
|
||||
PgfLiteralCallback* callback =
|
||||
gu_map_get(ps->callbacks,
|
||||
parg->ccat->cnccat,
|
||||
@@ -1647,8 +1649,12 @@ pgf_parsing_symbol(PgfParsing* ps, PgfItem* item, PgfSymbol sym)
|
||||
pgf_new_parse_state(ps, offset, BIND_NONE,
|
||||
item->inside_prob+item->conts->outside_prob);
|
||||
gu_buf_heap_push(state->agenda, pgf_item_prob_order, &item);
|
||||
match = true;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
pgf_item_free(ps, item);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user