jsquery_extract.c
static void
debugPath(StringInfo buf, PathItem *path)
{
	if (!path)
	{
		appendStringInfoChar(buf, '$');
		return;
	}
	if (path->parent)
	{
		debugPath(buf, path->parent);
		appendStringInfo(buf, ".");
	}
	switch (path->type)
	{
		case jqiAny:
			appendStringInfoChar(buf, '*');
			break;
		case jqiAnyKey:
			appendStringInfoChar(buf, '%');
			break;
		case jqiAnyArray:
			appendStringInfoChar(buf, '#');
			break;
		case jqiIndexArray:
			appendStringInfo(buf, "#%d", path->arrayIndex);
			break;
		case jqiKey:
			appendBinaryStringInfo(buf, path->s, path->len);
			break;
	}
}
/*
 * Debug print of variable path.
 */
Debug print of variable path.
Debug print of variable path .
static void
debugPath(StringInfo buf, PathItem *path)
{
	if (!path)
	{
		appendStringInfoChar(buf, '$');
		return;
	}
	if (path->parent)
	{
		debugPath(buf, path->parent);
		appendStringInfo(buf, ".");
	}
	switch (path->type)
	{
		case jqiAny:
			appendStringInfoChar(buf, '*');
			break;
		case jqiAnyKey:
			appendStringInfoChar(buf, '%');
			break;
		case jqiAnyArray:
			appendStringInfoChar(buf, '#');
			break;
		case jqiIndexArray:
			appendStringInfo(buf, "#%d", path->arrayIndex);
			break;
		case jqiKey:
			appendBinaryStringInfo(buf, path->s, path->len);
			break;
	}
}
static void debugPath ( StringInfo buf , PathItem * path ) { if ( ! path ) { appendStringInfoChar ( buf , ' ' ) ; return ; } if ( path -> parent ) { debugPath ( buf , path -> parent ) ; appendStringInfo ( buf , " " ) ; } switch ( path -> type ) { case jqiAny : appendStringInfoChar ( buf , ' ' ) ; break ; case jqiAnyKey : appendStringInfoChar ( buf , ' ' ) ; break ; case jqiAnyArray : appendStringInfoChar ( buf , ' ' ) ; break ; case jqiIndexArray : appendStringInfo ( buf , " " , path -> arrayIndex ) ; break ; case jqiKey : appendBinaryStringInfo ( buf , path -> s , path -> len ) ; break ; } }
Debug print of variable path.
Debug print of variable path .