aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-28 13:56:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-28 13:56:07 +0200
commit6c876cf3280ba63d6077656476c2fc692e4bb1ff (patch)
tree446394e681571e5bd59310a5cfc43ea3f69f364e /odb/pragma.cxx
parent886f5c5511a3b8291fafd7fe1435916a7c993cf0 (diff)
Qualify all unqualified name components in pointer types
This this necessary since they may not resolve in the typedef that we generate in namespace odb.
Diffstat (limited to 'odb/pragma.cxx')
-rw-r--r--odb/pragma.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/odb/pragma.cxx b/odb/pragma.cxx
index 3a1bc0f..9970376 100644
--- a/odb/pragma.cxx
+++ b/odb/pragma.cxx
@@ -3,18 +3,11 @@
// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
// license : GNU GPL v3; see accompanying LICENSE file
+#include <odb/cxx-lexer.hxx>
#include <odb/pragma.hxx>
using namespace std;
-// Token spelling. See cpplib.h for details.
-//
-#define OP(e, s) s ,
-#define TK(e, s) #e ,
-static char const* token_spelling[N_TTYPES] = { TTYPE_TABLE };
-#undef OP
-#undef TK
-
// Lists of pragmas.
//
loc_pragmas loc_pragmas_;
@@ -256,11 +249,17 @@ handle_pragma (cpp_reader* reader,
}
size_t pb (0);
+ bool punc (false);
for (tt = pragma_lex (&t);
tt != CPP_EOF && (tt != CPP_CLOSE_PAREN || pb != 0);
tt = pragma_lex (&t))
{
+ if (punc && tt > CPP_LAST_PUNCTUATOR)
+ val += ' ';
+
+ punc = false;
+
if (tt == CPP_OPEN_PAREN)
pb++;
else if (tt == CPP_CLOSE_PAREN)
@@ -288,16 +287,17 @@ handle_pragma (cpp_reader* reader,
case CPP_NAME:
{
val += IDENTIFIER_POINTER (t);
+ punc = true;
break;
}
default:
{
if (tt <= CPP_LAST_PUNCTUATOR)
- val += token_spelling[tt];
+ val += cxx_lexer::token_spelling[tt];
else
{
error ("unexpected token %qs in db pragma %qs",
- token_spelling[tt],
+ cxx_lexer::token_spelling[tt],
pc);
return;
}