summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/c/pgf/linearizer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/linearizer.c b/src/runtime/c/pgf/linearizer.c
index 8a48bb4fe..c5aac7f4f 100644
--- a/src/runtime/c/pgf/linearizer.c
+++ b/src/runtime/c/pgf/linearizer.c
@@ -378,7 +378,20 @@ pgf_lzn_resolve(PgfLzn* lzn, PgfExpr expr, PgfCCat* ccat, GuPool* pool)
gu_putc(']', wtr, err);
GuString s = gu_string_buf_freeze(sbuf, pool);
- ret = pgf_lzn_resolve_def(lzn, ccat->lindefs, s, pool);
+ if (ccat != NULL) {
+ ret = pgf_lzn_resolve_def(lzn, ccat->lindefs, s, pool);
+ } else {
+ PgfCncTreeLit* clit =
+ gu_new_variant(PGF_CNC_TREE_LIT,
+ PgfCncTreeLit,
+ &ret, pool);
+ clit->fid = lzn->fid++;
+ PgfLiteralStr* lit =
+ gu_new_variant(PGF_LITERAL_STR,
+ PgfLiteralStr,
+ &clit->lit, pool);
+ lit->val = s;
+ }
gu_pool_free(tmp_pool);
goto done;