aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pragma.cxx')
-rw-r--r--odb/pragma.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/odb/pragma.cxx b/odb/pragma.cxx
index 4d0acae..7a3d6ec 100644
--- a/odb/pragma.cxx
+++ b/odb/pragma.cxx
@@ -1089,18 +1089,23 @@ handle_pragma (cxx_lexer& l,
return;
}
- tt = l.next (tl, &tn);
-
- val = member_access (loc, false);
- if (!parse_expression (l, tt, tl, tn, val.value<member_access> ().expr, p))
- return; // Diagnostics has already been issued.
+ member_access ma (loc, p == "set" ? "modifier" : "accessor", false);
- if (tt != CPP_CLOSE_PAREN)
+ tt = l.next (tl, &tn);
+ if (tt != CPP_CLOSE_PAREN) // Empty expression are ok.
{
- error (l) << "')' expected at the end of db pragma " << p << endl;
- return;
+ if (!parse_expression (l, tt, tl, tn, ma.expr, p))
+ return; // Diagnostics has already been issued.
+
+ if (tt != CPP_CLOSE_PAREN)
+ {
+ error (l) << "')' expected at the end of db pragma " << p << endl;
+ return;
+ }
}
+ val = ma;
+
// Convert access to the get/set pair.
//
if (p == "access")
@@ -1109,6 +1114,8 @@ handle_pragma (cxx_lexer& l,
add_pragma (
pragma (p, "get", val, loc, &check_spec_decl_type, 0), decl, ns);
+ ma.kind = "modifier";
+ val = ma;
name = "set";
}