Example #1
0
    u32string
    print_type_variable_list(const C& c)
    {
      u32string result;

      auto iter = c.begin();

      if (iter != c.end())
      {
        result += print_type_variable(*iter);
        ++iter;
      }
      
      while (iter != c.end())
      {
        result += U", " + print_type_variable(*iter);
        ++iter;
      }

      return result;
    }
Example #2
0
File: type.c Project: MatzeB/fluffy
static void print_compound_type(const compound_type_t *type)
{
	fprintf(out, "%s", type->symbol->string);

	type_variable_t *type_parameter = type->type_parameters;
	if (type_parameter != NULL) {
		fprintf(out, "<");
		while (type_parameter != NULL) {
			if (type_parameter != type->type_parameters) {
				fprintf(out, ", ");
			}
			print_type_variable(type_parameter);
			type_parameter = type_parameter->next;
		}
		fprintf(out, ">");
	}
}
Example #3
0
File: ast.c Project: MatzeB/fluffy
static void print_type_parameters(const type_variable_t *type_parameters)
{
	int                    first          = 1;
	const type_variable_t *type_parameter = type_parameters;
	while (type_parameter != NULL) {
		if (first) {
			fprintf(out, "<");
			first = 0;
		} else {
			fprintf(out, ", ");
		}
		print_type_variable(type_parameter);

		type_parameter = type_parameter->next;
	}
	if (type_parameters != NULL)
		fprintf(out, ">");
}
Example #4
0
File: type.c Project: MatzeB/fluffy
static void print_type_reference_variable(const type_reference_t *type)
{
	type_variable_t *type_variable = type->type_variable;
	print_type_variable(type_variable);
}