mirror of
				https://github.com/python/cpython.git
				synced 2025-10-25 10:44:55 +00:00 
			
		
		
		
	 a5634c4067
			
		
	
	
		a5634c4067
		
			
		
	
	
	
	
		
			
			* Add new capability to the PEG parser to type variable assignments. For instance:
```
       | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a }
```
* Add new sequence types from the asdl definition (automatically generated)
* Make `asdl_seq` type a generic aliasing pointer type.
* Create a new `asdl_generic_seq` for the generic case using `void*`.
* The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed.
* New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences.
* Changes all possible `asdl_seq` types to use specific versions everywhere.
		
	
			
		
			
				
	
	
		
			6 lines
		
	
	
	
		
			181 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
	
		
			181 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include "Python.h"
 | |
| #include "asdl.h"
 | |
| 
 | |
| GENERATE_ASDL_SEQ_CONSTRUCTOR(generic, void*);
 | |
| GENERATE_ASDL_SEQ_CONSTRUCTOR(identifier, PyObject*);
 | |
| GENERATE_ASDL_SEQ_CONSTRUCTOR(int, int);
 |