How to use the deprecated.compiler.lib.lcomp.ast function in Deprecated

To help you get started, we’ve selected a few Deprecated examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github StanfordLegion / legion / deprecated / compiler / lib / lcomp / pretty.py View on Github external
@pretty_print_node.register(ast.Privilege)
def _(node, cx):
    if node.op is not None:
        return '%s<%s>(%s)' % (
            node.privilege,
            node.op,
            pretty_print_node(node.regions, cx))
    return '%s(%s)' % (
        node.privilege,
        pretty_print_node(node.regions, cx))
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / parse.py View on Github external
def p_expr_isnull(self, p):
        'expr : ISNULL "(" expr ")"'
        p[0] = ast.ExprIsnull(
            span = ast.Span.from_slice(p),
            pointer_expr = p[3])
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / trans.py View on Github external
@trans_node.register(ast.ExprNull)
def _(node, cx):
    return Value(
        node,
        Expr('(ptr_t::nil())', []),
        cx.type_map[node])
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / region_analysis.py View on Github external
@region_analysis_node.register(ast.ExprConstBool)
def _(node, cx):
    return Value()
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / type_check.py View on Github external
@type_check_node.register(ast.FieldValues)
def _(node, cx):
    return [type_check_node(field_value, cx)
            for field_value in node.field_values]
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / region_analysis.py View on Github external
@region_analysis_node.register(ast.ExprDereference)
def _(node, cx):
    region_analysis_node(node.pointer_expr, cx).read(cx)
    pointer_type = cx.type_map[node.pointer_expr].as_read()
    return Reference(pointer_type.points_to_type, pointer_type.regions, [])
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / type_check.py View on Github external
@type_check_node.register(ast.FunctionReturnType)
def _(node, cx):
    return type_check_node(node.declared_type, cx)
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / type_check.py View on Github external
@type_check_node.register(ast.FunctionName)
def _(node, cx):
    return node.name
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / parse.py View on Github external
def p_expr_unaryop(self, p):
        '''expr : "-" expr
                | "!" expr
                | "~" expr'''
        p[0] = ast.ExprUnaryOp(
            span = ast.Span.from_slice(p),
            op = p[1], arg = p[2])
github StanfordLegion / legion / deprecated / compiler / lib / lcomp / type_check.py View on Github external
@type_check_node.register(ast.StatementWhile)
def _(node, cx):
    condition_type = type_check_node(node.condition, cx).check_read(node.condition, cx)
    type_check_node(node.block, cx)
    if not types.is_bool(condition_type):
        raise types.TypeError(node, 'While condition expression is not type bool')
    return types.Void()