mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-19 16:12:52 -06:00
fix the order in which HOAS variables are shown in pgf_graphviz_abstract_tree
This commit is contained in:
@@ -447,18 +447,15 @@ void PgfPrinter::parg(ref<PgfDTyp> ty, ref<PgfPArg> parg)
|
|||||||
puts(")");
|
puts(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PgfPrinter::bindings(size_t n_vars)
|
void PgfPrinter::bindings(PgfPrintContext *context, size_t n_vars)
|
||||||
{
|
{
|
||||||
bool first = true;
|
if (context == NULL || n_vars == 0)
|
||||||
PgfPrintContext *context = ctxt;
|
return;
|
||||||
while (context != NULL && n_vars > 0) {
|
|
||||||
if (!first) {
|
bindings(context->next, n_vars-1);
|
||||||
puts(",");
|
if (n_vars > 1)
|
||||||
first = false;
|
puts(",");
|
||||||
}
|
efun(&context->name);
|
||||||
efun(&context->name);
|
|
||||||
context = context->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PgfPrinter::lvar(size_t var)
|
void PgfPrinter::lvar(size_t var)
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class PGF_INTERNAL_DECL PgfPrinter : public PgfUnmarshaller {
|
|||||||
// The marshaller for pattern matching
|
// The marshaller for pattern matching
|
||||||
PgfMarshaller *m;
|
PgfMarshaller *m;
|
||||||
|
|
||||||
|
void bindings(PgfPrintContext *context, size_t n_vars);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PgfPrinter(PgfPrintContext *context, int priority,
|
PgfPrinter(PgfPrintContext *context, int priority,
|
||||||
PgfMarshaller *marshaller);
|
PgfMarshaller *marshaller);
|
||||||
@@ -73,7 +75,9 @@ public:
|
|||||||
size_t n_exprs, PgfExpr *exprs);
|
size_t n_exprs, PgfExpr *exprs);
|
||||||
virtual void free_ref(object x);
|
virtual void free_ref(object x);
|
||||||
|
|
||||||
void bindings(size_t n_vars);
|
void bindings(size_t n_vars) {
|
||||||
|
bindings(ctxt,n_vars);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user