ó o”ŝfc@s?dZddlmZmZdd„Zddd„ƒYZdS(s8Check for errs in the AST. The Python parser does not catch all syntax errors. Others, like assignments with invalid targets, are caught in the code generation phase. The compiler package catches some errors in the transformer module. But it seems clearer to write checkers that use the AST to detect errors. i˙˙˙˙(tasttwalkcCs t|ƒ}t||ƒ|jS(N(tSyntaxErrorCheckerRterrors(ttreetmultitv((s'/usr/lib64/python2.7/compiler/syntax.pytchecks  RcBs,eZdZdd„Zd„Zd„ZRS(s+A visitor to find syntax errors in the AST.cCs||_d|_dS(s¸Create new visitor object. If optional argument multi is not None, then print messages for each error rather than raising a SyntaxError for the first. iN(RR(tselfR((s'/usr/lib64/python2.7/compiler/syntax.pyt__init__s cCsZ|jd|_|jdk r:d|j|j|fGHntd||j|jf‚dS(Nis %s:%s: %ss %s (%s:%s)(RRtNonetfilenametlinenot SyntaxError(Rtnodetmsg((s'/usr/lib64/python2.7/compiler/syntax.pyterror scCsdS(N((RR((s'/usr/lib64/python2.7/compiler/syntax.pyt visitAssign'sN(t__name__t __module__t__doc__R R RR(((s'/usr/lib64/python2.7/compiler/syntax.pyRs N((RtcompilerRRR RR(((s'/usr/lib64/python2.7/compiler/syntax.pyt s