mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +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 !== '') {
 | 
			
		||||
      throw new Error(`extra text in parameter list ${JSON.stringify(text)}`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
    if (name in defApis) {
 | 
			
		||||
      throw new Error(`multiple defApi calls for ${name}`);
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -130,6 +132,12 @@ for (let file of files) {
 | 
			
		|||
    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
 | 
			
		||||
  for (let idx = 0; idx < contents.length; ) {
 | 
			
		||||
    let nextIdx = contents.indexOf('typedef enum', idx);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue