예제 #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
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
def return_check(ast, M):
    'Ensure all functions and conditionals end in return statements'
    Front.return_check(ast)
    return ast