Introduced type matchers.

This commit is contained in:
Roberto Raggi
2009-11-23 11:56:44 +01:00
parent 51809d12a7
commit 0528f2407a
24 changed files with 540 additions and 51 deletions

View File

@@ -53,11 +53,7 @@
#include "AST.h"
#include "Literals.h"
#include "ObjectiveCTypeQualifiers.h"
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <cassert>
#include <string>
#include <cstdio> // for putchar
#define CPLUSPLUS_NO_DEBUG_RULE
@@ -72,7 +68,13 @@ class DebugRule {
public:
DebugRule(const char *name)
: name(name)
{ std::cout << std::string(depth++, ' ') << name << std::endl; }
{
for (int i = 0; i < depth; ++i)
putchar(' ');
++depth;
printf("%s\n", name);
}
~DebugRule()
{ --depth; }