#ifndef WONKY_PRINT_H
#define WONKY_PRINT_H WONKY_PRINT_H
#include <print.hh>
#include <stdio.h>
#include <wonky_assert.h>
#include <wonky_malloc.h>
#include <wonky.h>
#include <common.h>
#include <compile.h>
#include <queue.h>
#include <object.h>
#include <value.h>
#include <program.h>
#include <translation_unit.h>
#include <gcc_error.h>
#include <wonky_stream.h>
#define ASTPTR(s) ((struct AST*)(s))
void print_token(struct wonky_stream *out,struct token *token);
void print_tokens(struct wonky_stream *out,struct Token_Pointer *ptr);
char print_tokens_of_program(struct wonky_stream *out,char **base_source_names);
void print_ast_enum(struct wonky_stream *out,enum AST_Type op);
void print_error_tree(struct wonky_stream *out,struct AST_Error *error,short indentation);
void print_designator_expression_tree(struct wonky_stream *out,struct AST_Designator *designator,short indentation);
void print_binary_expression_tree(struct wonky_stream *out,struct AST_Binary_Expression *bin);
void print_conditional_expression_tree(struct wonky_stream *out,struct AST_Conditional_Expression *cond);
void print_function_expression_tree(struct wonky_stream *out,struct AST_Function_Expression *function_call);
void print_unary_expression_tree(struct wonky_stream *out,struct AST_Unary_Expression *unary_expression);
void print_constant_tree(struct wonky_stream *out,struct AST_Constant *constant);
void print_string_literal(struct wonky_stream *out,struct AST_String_Literal *string);
//void print_lvalue_expression_tree(struct wonky_stream *out,struct AST_Lvalue_Expression *lval);
void print_labeled_statement_tree(struct wonky_stream *out,struct AST_Labeled_Statement *lab,short indentation);
void print_compound_statement_tree(struct wonky_stream *out,struct AST_Compound_Statement *comp,short indentation);
void print_if_statement_tree(struct wonky_stream *out,struct AST_If_Statement *ifs,short indentation);
void print_switch_statement_tree(struct wonky_stream *out,struct AST_Switch_Statement *swi,short indentation);
void print_while_statement_tree(struct wonky_stream *out,struct AST_While_Statement *whi,short indentation);
void print_do_while_statement_tree(struct wonky_stream *out,struct AST_Do_While_Statement *whi,short indentation);
void print_for_statement_tree(struct wonky_stream *out,struct AST_For_Statement *fo,short indentation);
void print_return_statement_tree(struct wonky_stream *out,struct AST_Return_Statement *return_expression,short indentation);
void print_goto_statement_tree(struct wonky_stream *out,struct AST_Goto_Statement *got,short indentation);
void print_type(struct wonky_stream *out,struct Type *type,char print_struct_union);
void print_denoted(struct wonky_stream *out,struct Denoted *denoted);
void print_denoted_argument(struct wonky_stream *out,struct Denoted_Object *denoted);
void print_list_of_denoted(struct wonky_stream *out,struct Queue *denoted);
void print_enumeration(struct wonky_stream *out,struct Enum *enumeration);
void print_struct_union(struct wonky_stream *out,struct Struct_Union *struct_union);
void print_object(struct wonky_stream *out,struct Object *object);
void print_normal_object(struct wonky_stream *out,struct Object *object);
void print_bitfield_object(struct wonky_stream *out,struct Object_Bitfield *object);
void print_translation_unit_tree(struct wonky_stream *out,struct AST_Translation_Unit *unit,short indentation);
void print_ast(struct wonky_stream *out,struct AST* tree,short indentation);
void print_program_tokens(struct wonky_stream *out,struct Program *program);
void print_program_ast(struct wonky_stream *out,struct Program *program);
void print_keyword_enum(struct wonky_stream *out,enum LEXER_TYPE kw);
void print_function_definition(struct wonky_stream *out,struct AST_Function_Definition *function,short indentation);
void print_errors(struct wonky_stream *out,struct Queue *errors);
void print_function_args(struct wonky_stream *out,struct Type_Function *func);
void print_type_qualifier(struct wonky_stream *out,struct Type *type);
void print_type_constraint_enum(struct wonky_stream *out,enum Type_Specifier specifier);
void print_type_sign_enum(struct wonky_stream *out,enum Type_Signedness sign);
void print_type_constraint(struct wonky_stream *out,struct Type *type);
void print_type_sign(struct wonky_stream *out,struct Type *type);
void print_expression_value(struct wonky_stream *out,struct Expression_Value *value);
void print_expression_value_type(struct wonky_stream *out,struct Expression_Value *value);
void print_id(struct wonky_stream *out,struct identifier *id);
void print_indentation(struct wonky_stream *out,short indentation);
void print_constant(struct wonky_stream *out,struct Constant *constant);
void print_token_text(struct wonky_stream *out,struct token *token);
void print_raw_token_text(struct wonky_stream *out,struct token *token);
#endif