コード例 #1
0
ファイル: ValidateVariableNames.py プロジェクト: Anteru/nsl
    def v_Function(self, func, ctx=None):
        ctx = self.Context(ctx)
        for arg in func.GetArguments():
            ctx.Add(arg.GetName(), arg.GetLocation())

        with Errors.CompileExceptionToErrorHandler(self.errorHandler,
                                                   self.__onError):
            self.v_Visit(func.GetBody(), ctx)
コード例 #2
0
    def v_Expression(self, expr, ctx=None):
        if isinstance(expr, ast.ArrayExpression):
            with Errors.CompileExceptionToErrorHandler(self.errorHandler):
                self._ValidateArrayExpression(expr)

        expr.AcceptVisitor(self)
コード例 #3
0
ファイル: ValidateFlowStatements.py プロジェクト: Anteru/nsl
 def __VisitLoop(self, stmt, ctx):
     ctx += 1
     with Errors.CompileExceptionToErrorHandler(self.errorHandler):
         stmt.AcceptVisitor(self, ctx)
     ctx -= 1
コード例 #4
0
ファイル: ValidateVariableNames.py プロジェクト: Anteru/nsl
    def v_IfStatement(self, ifStatement, ctx=None):
        ctx = self.Context(ctx)

        with Errors.CompileExceptionToErrorHandler(self.errorHandler,
                                                   self.__onError):
            ifStatement.AcceptVisitor(self, ctx)
コード例 #5
0
ファイル: ValidateVariableNames.py プロジェクト: Anteru/nsl
 def v_StructureDefinition(self, sd, ctx=None):
     ctx = self.Context()
     with Errors.CompileExceptionToErrorHandler(self.errorHandler,
                                                self.__onError):
         sd.AcceptVisitor(self, ctx)
コード例 #6
0
 def v_Function(self, f, ctx=None):
     with Errors.CompileExceptionToErrorHandler(self.errorHandler):
         self._ValidateFunction(f)