mirror of
https://github.com/Z3Prover/z3
synced 2025-06-08 23:23:23 +00:00
fixed more problems in the new param framework
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
d634c945bf
commit
6d7d205e13
30 changed files with 185 additions and 168 deletions
|
@ -21,6 +21,29 @@ Notes:
|
|||
#include"symbol.h"
|
||||
#include"dictionary.h"
|
||||
|
||||
std::string norm_param_name(char const * n) {
|
||||
if (n == 0)
|
||||
return "_";
|
||||
if (*n == ':')
|
||||
n++;
|
||||
std::string r = n;
|
||||
unsigned sz = r.size();
|
||||
if (sz == 0)
|
||||
return "_";
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
char curr = r[i];
|
||||
if ('A' <= curr && curr <= 'Z')
|
||||
r[i] = curr - 'A' + 'a';
|
||||
else if (curr == '-' || curr == ':')
|
||||
r[i] = '_';
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
std::string norm_param_name(symbol const & n) {
|
||||
return norm_param_name(n.bare_str());
|
||||
}
|
||||
|
||||
struct param_descrs::imp {
|
||||
struct info {
|
||||
param_kind m_kind;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue