/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Tools/c-analyzer/c_parser/preprocessor/pure.py
23 строки
592 B
Eric Snow
gh-90110: Fix the c-analyzer Tool (gh-96731)
12 сен 2022, 20:09
Не верифицирован
12 сен 2022, 20:09
1756ffd
Код
Авторство
О чём код?
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, )