libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
Macros
print.h File Reference
#include <stdio.h>
#include "def.h"

Go to the source code of this file.

Macros

#define PS_PRINT_DECL(T)   void T##_print(const struct T* self, char terminator)
 
#define PS_PRINT_IMPL(T, ...)
 
#define PS_IPRINT_DECL(T)    void T##_print(const struct T* self, char terminator, int indent)
 
#define PS_IPRINT_IMPL(T, ...)
 
#define ps_print_indent()   printf("%*s", indent, "")
 
#define ps_next_indent()   indent + 2
 

Macro Definition Documentation

◆ PS_IPRINT_DECL

#define PS_IPRINT_DECL (   T)     void T##_print(const struct T* self, char terminator, int indent)

Definition at line 18 of file print.h.

◆ PS_IPRINT_IMPL

#define PS_IPRINT_IMPL (   T,
  ... 
)
Value:
{__VA_ARGS__}; \
if (terminator != 0) { \
putchar(terminator); \
} \
}
#define PS_IPRINT_DECL(T)
Definition print.h:18
#define T(token_type)
Definition token_type.h:10

Definition at line 20 of file print.h.

◆ ps_next_indent

#define ps_next_indent ( )    indent + 2

Definition at line 28 of file print.h.

◆ PS_PRINT_DECL

#define PS_PRINT_DECL (   T)    void T##_print(const struct T* self, char terminator)

Definition at line 9 of file print.h.

◆ PS_PRINT_IMPL

#define PS_PRINT_IMPL (   T,
  ... 
)
Value:
{__VA_ARGS__}; \
if (terminator != 0) { \
putchar(terminator); \
} \
}
#define PS_PRINT_DECL(T)
Definition print.h:9

Definition at line 10 of file print.h.

◆ ps_print_indent

#define ps_print_indent ( )    printf("%*s", indent, "")

Definition at line 27 of file print.h.