ó œI:Uc@sÁddlZddlZddlmZedƒ\ZZZdefd„ƒYZ defd„ƒYZ ddd „Z ddd „Z ddd „Zd „Zddd „Zddd„ZdS(i˙˙˙˙Ni(tutilsitPositioncBsAeZdZdZd d d d„Zd„Zd„Zd„ZRS( sU Represents a position in the source file which we want to inform about. tfilenametlinetcolumncCs||_||_||_dS(N(RRR(tselfRRR((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__init__)s  cCs1t|j|j|jf|j|j|jfƒS(N(tcmpRRR(Rtother((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__cmp__.scCs2dtjj|jƒ|jp!d|jp-dfS(Nsi˙˙˙˙(tostpathtbasenameRRR(R((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__repr__2s!cCs˛tjj|jƒ}tjj|ƒ}tjj||fƒ}|r]tjj||ƒ}n|jdk rƒd||j|jfS|jdk rŁd||jfSd|fSdS(Ns%s:%d:%ds%s:%ds%s:( R R trealpathRt commonprefixtrelpathRtNoneR(RtcwdRt common_prefix((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytformat6s(sfilenameslinescolumnN( t__name__t __module__t__doc__t __slots__RRR R R(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR!s   t MessageLoggercBskeZdZdd„Zed„ƒZd„Zd„Zd„Z ddd„Z ddd„Z d„Z RS( cCsX|dkrtj}ntjƒ|_||_||_g|_d|_ d|_ dS(Ni( RtsyststderrR tgetcwdt_cwdt_outputt _namespacet_enable_warningst_warning_countt _error_count(Rt namespacetoutput((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyRHs      cOs+|jdkr$|||Ž|_n|jS(N(t _instanceR(tclstargstkwargs((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytgetRscCs ||_dS(N(R (Rt log_types((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytenable_warningsXscCs|jS(N(R!(R((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytget_warning_count[scCs|jS(N(R"(R((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytget_error_count^scCsÄtjdƒ|jd7_||jkr/dSt|ƒtkrPt|ƒ}nt|tƒrk|g}n|sƒtdƒg}nx8|d D],}|j j d|j d|j ƒfƒqŽW|dj d|j ƒ}|t krěd}n9|tkrd }|jd7_n|tkr%d }n|rMd |||jj||f}n;|jrud |||jj|f}nd |||f}|j j |ƒ|tkrŔtjdƒt|ƒ‚ndS(s“ Log a warning, using optional file positioning information. If the warning is related to a ast.Node type, see log_node(). twarningiNs i˙˙˙˙s%s: RtWarningtErrortFatals%s: %s: %s: %s: %s s%s: %s: %s: %s s %s: %s: %s tfatal(Rtbreak_on_debug_flagR!R ttypetsettlistt isinstanceRRtwriteRRtWARNINGtERRORR"tFATALRtnamet SystemExit(Rtlog_typettextt positionstprefixtpositiont last_positiont error_type((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytlogas>  *          cCsŐ|r nXt|ddƒr'|j}n:|rB|jrB|j}ng}|sad||f}n|r‰dt|d|jƒ|f}n5| ržt|dƒržd|jj|j|f}n|j|||ƒdS(sR Log a warning, using information about file positions from the given node. The optional context argument, if given, should be another ast.Node type which will also be displayed. If no file position information is available from the node, the position data from the context will be used. tfile_positionss context=%r %ss%s: %stsymbolR<s (%s)%s: %sN(tgetattrRRFR<thasattrt __class__RRE(RR>tnodeR?tcontextR@((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytlog_node‘s  "cCs*|j|||jdd|jfƒdS(s1Log a warning in the context of the given symbol.RAs symbol=%rN(RERBtident(RR>RGR?((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt log_symbolŤsN( RRRR%Rt classmethodR)R+R,R-RERMRO(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyREs    0cCs/tjƒ}|j|||d|d|ƒdS(NRLR@(RR)RM(R>RKR?RLR@tml((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyRMąs cCs&tjƒ}|jt|||ƒdS(N(RR)RER9(R?R@RARQ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytwarnśs cCs tt||d|d|ƒdS(NRLR@(RMR9(RKR?RLR@((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt warn_nodeťscCs#tjƒ}|jt||ƒdS(N(RR)ROR9(RGR?RQ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt warn_symbolżs cCs&tjƒ}|jt|||ƒdS(N(RR)RER:(R?R@RARQ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyterrorÄs cCs&tjƒ}|jt|||ƒdS(N(RR)RER;(R?R@RARQ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR2És (R RtRtrangeR9R:R;tobjectRRRRMRRRSRTRUR2(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyts  $l