mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	This includes: * update the whitelists * fixes so we can stop ignoring some of the files * ensure Include/cpython/*.h get analyzed
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			592 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			592 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from ..source import (
 | 
						|
    opened as _open_source,
 | 
						|
)
 | 
						|
from . import common as _common
 | 
						|
 | 
						|
 | 
						|
def preprocess(lines, filename=None, cwd=None):
 | 
						|
    if isinstance(lines, str):
 | 
						|
        with _open_source(lines, filename) as (lines, filename):
 | 
						|
            yield from preprocess(lines, filename)
 | 
						|
        return
 | 
						|
 | 
						|
    # XXX actually preprocess...
 | 
						|
    for lno, line in enumerate(lines, 1):
 | 
						|
        kind = 'source'
 | 
						|
        data = line
 | 
						|
        conditions = None
 | 
						|
        yield _common.SourceLine(
 | 
						|
            _common.FileInfo(filename, lno),
 | 
						|
            kind,
 | 
						|
            data,
 | 
						|
            conditions,
 | 
						|
        )
 |