ó ~ŠXc@`s.ddlmZddlmZddlmZddlmZddlZddlZddlZddlm Z e dƒ\Z Z Z d efd „ƒYZd efd „ƒYZddd „Zddddd„Zddd„Zddd„Zd„Zddddd„Zddddd„ZdS(i(tabsolute_import(tdivision(tprint_function(tunicode_literalsNi(tutilsitPositioncB`s€eZdZdZdddd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„ZRS(uU Represents a position in the source file which we want to inform about. ufilenameulineucolumncC`s||_||_||_dS(N(tfilenametlinetcolumn(tselfRRR((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__init__/s  cC`s1||j|j|jf|j|j|jfƒS(N(RRR(R tothertop((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt_compare4scC`s|j|tjƒS(N(R toperatortlt(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__lt__8scC`s|j|tjƒS(N(R Rtgt(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__gt__;scC`s|j|tjƒS(N(R Rtge(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__ge__>scC`s|j|tjƒS(N(R Rtle(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__le__AscC`s|j|tjƒS(N(R Rteq(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__eq__DscC`s|j|tjƒS(N(R Rtne(R R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__ne__GscC`st|j|j|jfƒS(N(thashRRR(R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__hash__JscC`s2dtjj|jƒ|jp!d|jp-dfS(Nuiÿÿÿÿ(tostpathtbasenameRRR(R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt__repr__Ms cC`s²tjj|jƒ}tjj|ƒ}tjj||fƒ}|r]tjj||ƒ}n|jdk rƒd||j|jfS|jdk r£d||jfSd|fSdS(Nu%s:%d:%du%s:%du%s:( RRtrealpathRt commonprefixtrelpathRtNoneR(R tcwdRt common_prefix((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytformatRs(ufilenameulineucolumnN(t__name__t __module__t__doc__t __slots__R$R R RRRRRRRR R'(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR's         t MessageLoggercB`steZdZddd„Zed„ƒZd„Zd„Zd„Z ddddd„Z ddd„Z d„Z RS( cC`sX|dkrtj}ntjƒ|_||_||_g|_d|_ d|_ dS(Ni( R$tsyststderrRtgetcwdt_cwdt_outputt _namespacet_enable_warningst_warning_countt _error_count(R t namespacetoutput((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR ds      cO`s+|jdkr$|||Ž|_n|jS(N(t _instanceR$(tclstargstkwargs((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytgetnscC`s ||_dS(N(R3(R t log_types((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytenable_warningstscC`s|jS(N(R4(R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytget_warning_countwscC`s|jS(N(R5(R ((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytget_error_countzsc C`stjdƒ|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|dk r[|dk r[d ||d |d f}n|r¥|jrŒd|| |jj||f}qàd|| ||f}n;|jrÍd|| |jj|f}nd|| |f}|j j |ƒ|tkrtjdƒt|ƒ‚ndS(u“ Log a warning, using optional file positioning information. If the warning is related to a ast.Node type, see log_node(). uwarningiNu iÿÿÿÿu%s: R%uWarninguErroruFatalu%s %s %su u^u%s: %s: %s: %s: %s u%s: %s: %s: %s u %s: %s: %s ufatal(Rtbreak_on_debug_flagR4R3ttypetsettlistt isinstanceRR1twriteR'R0tWARNINGtERRORR5tFATALR$R2tnamet SystemExit( R tlog_typettextt positionstprefixt marker_post marker_linetpositiont last_positiont error_type((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytlog}sH  *            cC`s¿|r nBt|ddƒr'|j}n$|rB|jrB|j}n tƒ}|rsdt|d|jƒ|f}n5| r¨t|dƒr¨d|jj|j|f}n|j|||ƒdS(uR 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. ufile_positionsu%s: %susymbolunameu (%s)%s: %sN( tgetattrR$tfile_positionsRCRJthasattrt __class__R(RU(R RLtnodeRMtcontextRN((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytlog_node´s   "cC`s*|j|||jdd|jfƒdS(u1Log a warning in the context of the given symbol.ROu symbol='%s'N(RURRtident(R RLtsymbolRM((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt log_symbolÌsN( R(R)R$R8R t classmethodR<R>R?R@RUR\R_(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR,as    7cC`s/tjƒ}|j|||d|d|ƒdS(NR[RN(R,R<R\(RLRZRMR[RNtml((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyR\Òs cC`s,tjƒ}|jt|||||ƒdS(N(R,R<RURG(RMRNRORPRQRa((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytwarn×s cC`s tt||d|d|ƒdS(NR[RN(R\RG(RZRMR[RN((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt warn_nodeÜscC`s tt||d|d|ƒdS(NR[RN(R\RH(RZRMR[RN((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt error_nodeàscC`s#tjƒ}|jt||ƒdS(N(R,R<R_RG(R^RMRa((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyt warn_symboläs cC`s,tjƒ}|jt|||||ƒdS(N(R,R<RURH(RMRNRORPRQRa((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyterrorés cC`s,tjƒ}|jt|||||ƒdS(N(R,R<RURI(RMRNRORPRQRa((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pytfatalîs (t __future__RRRRRR-RtRtrangeRGRHRItobjectRR,R$R\RbRcRdReRfRg(((sq/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/message.pyts"   :q