aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-19 14:21:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-19 14:21:30 +0200
commit6c01cad9cbfb6e69121d106226b2c50026f86fa9 (patch)
treeb3225c9b113f52cf63ed13ad7ca2be0693f2bd03 /odb/pragma.cxx
parentab132de5f11e414974cdc0c4b8d85a19792b2e47 (diff)
Use scope and location of db pointer pragma instead of class
Diffstat (limited to 'odb/pragma.cxx')
-rw-r--r--odb/pragma.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/odb/pragma.cxx b/odb/pragma.cxx
index e41792a..2fb6d27 100644
--- a/odb/pragma.cxx
+++ b/odb/pragma.cxx
@@ -506,7 +506,7 @@ handle_pragma (cpp_reader* reader,
return;
}
- string v;
+ class_pointer cp;
size_t pb (0);
bool punc (false);
@@ -515,7 +515,7 @@ handle_pragma (cpp_reader* reader,
tt = pragma_lex (&t))
{
if (punc && tt > CPP_LAST_PUNCTUATOR)
- v += ' ';
+ cp.name += ' ';
punc = false;
@@ -530,29 +530,29 @@ handle_pragma (cpp_reader* reader,
{
case CPP_LESS:
{
- v += "< ";
+ cp.name += "< ";
break;
}
case CPP_GREATER:
{
- v += " >";
+ cp.name += " >";
break;
}
case CPP_COMMA:
{
- v += ", ";
+ cp.name += ", ";
break;
}
case CPP_NAME:
{
- v += IDENTIFIER_POINTER (t);
+ cp.name += IDENTIFIER_POINTER (t);
punc = true;
break;
}
default:
{
if (tt <= CPP_LAST_PUNCTUATOR)
- v += cxx_lexer::token_spelling[tt];
+ cp.name += cxx_lexer::token_spelling[tt];
else
{
error () << "unexpected token '" << cxx_lexer::token_spelling[tt]
@@ -570,13 +570,15 @@ handle_pragma (cpp_reader* reader,
return;
}
- if (v.empty ())
+ if (cp.name.empty ())
{
error () << "expected pointer name in db pragma " << p << endl;
return;
}
- val = v;
+ cp.scope = current_scope ();
+ cp.loc = loc;
+ val = cp;
tt = pragma_lex (&t);
}