관리-도구
편집 파일: pretty_gyp.pyo
� ��Rac @ s� d Z d d l m Z d d l Z d d l Z e j d � Z d Z e j e � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e d k r� e j e � � n d S( s) Pretty-prints the contents of a GYP file.i����( t print_functionNs \s*#.*s% (?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)c C s1 | j d � | j d � d t | j d � � S( Ni i t #i ( t groupt len( t matchobj( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt comment_replace s c C s2 t j d � } g | D] } | j t | � ^ q S( s@ Mask the quoted strings so we skip braces inside quoted strings.s (.*?)(#)(.*)( t ret compilet subR ( t inputt search_ret line( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt mask_comments s c C sB d | j d � | j d � d t | j d � � | j d � f S( Ns %s%s%s%si i t xi ( R R ( R ( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt quote_replace$ s c C s6 t j d t � } g | D] } | j t | � ^ q S( s@ Mask the quoted strings so we skip braces inside quoted strings.s (.*?)( R R t QUOTE_RE_STRR R ( R R R ( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt mask_quotes+ s c C s� g } g } x� t | | � D]� \ } } | j | � } xZ | r� t | j d � � } | | d | | } | | d | | } | j | � } q: W| j | j d � � | j | j d � � q W| | f S( Ni s \n( t zipt matchR R t extendt split( R t masked_inputR t outputt mask_outputR t masked_linet mR ( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt do_split1 s c C sj t j d � } t j d � } t | � } t | � } t | | | � \ } } t | | | � \ } } | S( sM Masks out the quotes and comments, and then splits appropriate lines (lines that matche the double_*_brace re's above) before indenting them below. These are used to split lines which have multiple braces on them, so that the indentation looks prettier when all laid out (e.g. closing braces make a nice diagonal line). s (.*?[\[\{\(,])(\s*)([\[\{\(])s (.*?[\]\}\)],?)(\s*)([\]\}\)])( R R R R R ( R t double_open_brace_ret double_close_brace_reR R R ( ( sh /opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/pretty_gyp.pyt split_double_braces@ s c C s d d d g } d d d g } t j d � } d } t j d | � } t j d | � } xb | D]Z } x'