mirror of
https://github.com/Z3Prover/z3
synced 2025-06-09 07:33:24 +00:00
add preliminary stub to handle closure types
This commit is contained in:
parent
d777306bb6
commit
36cfb88f5f
1 changed files with 8 additions and 0 deletions
|
@ -120,6 +120,8 @@ for (let file of files) {
|
||||||
if (text !== '') {
|
if (text !== '') {
|
||||||
throw new Error(`extra text in parameter list ${JSON.stringify(text)}`);
|
throw new Error(`extra text in parameter list ${JSON.stringify(text)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (name in defApis) {
|
if (name in defApis) {
|
||||||
throw new Error(`multiple defApi calls for ${name}`);
|
throw new Error(`multiple defApi calls for ${name}`);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +132,12 @@ for (let file of files) {
|
||||||
types[match.groups.type] = match.groups.type;
|
types[match.groups.type] = match.groups.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we don't have to pre-populate the types map with closure types
|
||||||
|
// use the Z3_DECLARE_CLOSURE to identify closure types
|
||||||
|
// for (let match of contents.matchAll(/Z3_DECLARE_CLOSURE\((?<type>[A-Za-z0-9_]+),/g)) {
|
||||||
|
// types[match.groups.type] = match.groups.type
|
||||||
|
// }
|
||||||
|
|
||||||
// parse enum declarations
|
// parse enum declarations
|
||||||
for (let idx = 0; idx < contents.length; ) {
|
for (let idx = 0; idx < contents.length; ) {
|
||||||
let nextIdx = contents.indexOf('typedef enum', idx);
|
let nextIdx = contents.indexOf('typedef enum', idx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue