コード例 #1
0
ファイル: passes.py プロジェクト: wuzy2d/copperhead
def syntax_check(ast, M):
    'Ensure syntactic rules of language have been kept'
    #Ensure all functions and tuples have bounded arity
    Front.arity_check(ast)
    #Ensure all functions and conditionals end in return statements
    Front.return_check(ast)
    #Ensure builtins are not overridden
    Front.builtin_check(ast)
    return ast
コード例 #2
0
ファイル: passes.py プロジェクト: asterbini/copperhead
def syntax_check(ast, M):
    'Ensure syntactic rules of language have been kept'
    #Ensure all functions and tuples have bounded arity
    Front.arity_check(ast)
    #Ensure all functions and conditionals end in return statements
    Front.return_check(ast)
    #Ensure builtins are not overridden
    Front.builtin_check(ast)
    return ast
コード例 #3
0
ファイル: passes.py プロジェクト: wuzy2d/copperhead
def return_check(ast, M):
    'Ensure all functions and conditionals end in return statements'
    Front.return_check(ast)
    return ast
コード例 #4
0
ファイル: passes.py プロジェクト: asterbini/copperhead
def return_check(ast, M):
    'Ensure all functions and conditionals end in return statements'
    Front.return_check(ast)
    return ast