Sha256: 90e2f6b9cd32b1d52a951bef4e0d8de3c613122cbefda01745f33804297e3672

Contents?: true

Size: 732 Bytes

Versions: 8

Compression:

Stored size: 732 Bytes

Contents

#ifndef DEBUG_H
#define DEBUG_H

#include <stdint.h>

enum dbg_lvl_t : uint32_t {
	NONE = 0,
	TRIM = 1,
	CHUNKS = 2,
	SUBWEAVE = 4,
	WEAVE = 8,
	EXTEND_COMPOUND = 16,
	EXTEND_COMPLEX = 32,
	LCS = 64,
  EXTEND_OBJECT = 128,
	ALL = UINT32_MAX
};

#ifdef DEBUG

#ifndef DEBUG_LVL
const uint32_t debug_lvl = UINT32_MAX;
#else
const uint32_t debug_lvl = (DEBUG_LVL);
#endif // DEBUG_LVL

#define DEBUG_PRINT(lvl, x) if((lvl) & debug_lvl) { std::cerr << x; }
#define DEBUG_PRINTLN(lvl, x) if((lvl) & debug_lvl) { std::cerr << x << std::endl; }
#define DEBUG_EXEC(lvl, x) if((lvl) & debug_lvl) { x; }

#else // DEBUG

#define DEBUG_PRINT(lvl, x)
#define DEBUG_PRINTLN(lvl, x)
#define DEBUG_EXEC(lvl, x)

#endif // DEBUG

#endif // DEBUG_H

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sassc-0.0.9 ext/libsass/debug.hpp
sassc-0.0.8 ext/libsass/debug.hpp
sassc-0.0.7 ext/libsass/debug.hpp
sassc-0.0.6 ext/libsass/debug.hpp
sassc-0.0.5 ext/libsass/debug.hpp
sassc-0.0.4 ext/libsass/debug.hpp
sassc-0.0.2 ext/libsass/debug.hpp
sassc-0.0.1 ext/libsass/debug.hpp