File: //opt/saltstack/salt/lib/python3.10/site-packages/pycparser/__pycache__/__init__.cpython-310.pyc
o
;j
� @ sL g d �Z dZddlZddlmZ ddlmZ ejZdd d
�Z ddd
�Z dS ))Zc_lexer�c_parserZc_astz3.00� N)�check_output� )r �cpp� c
C st |g}t |t�r
||7 }n |dkr||g7 }|| g7 }z t|dd�}W |S ty9 } z tdd|� � ��d}~ww )aD Preprocess a file using cpp.
filename:
Name of the file you want to preprocess.
cpp_path:
cpp_args:
Refer to the documentation of parse_file for the meaning of these
arguments.
When successful, returns the preprocessed file's contents.
Errors from cpp will be printed out.
r T)�universal_newlineszAUnable to invoke 'cpp'. Make sure its path was passed correctly
zOriginal error: N)�
isinstance�listr �OSError�RuntimeError)�filename�cpp_path�cpp_args� path_list�text�e� r �F/opt/saltstack/salt/lib/python3.10/site-packages/pycparser/__init__.py�preprocess_file s"