Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(179)  |  Call(147)  |  Derive(0)  |  Import(32)

        def buildNode(provider, node, source_ref, allow_none = False):
    if node is None and allow_none:
        return None

    try:
        kind = getKind( node )

        if hasattr( node, "lineno" ):
            source_ref = source_ref.atLineNumber( node.lineno )
        else:
            source_ref = source_ref

        if kind in build_nodes_args3:
            result = build_nodes_args3[ kind ](
                provider   = provider,
                node       = node,
                source_ref = source_ref
            )
        elif kind in build_nodes_args2:
            result = build_nodes_args2[ kind ](
                node       = node,
                source_ref = source_ref
            )
        elif kind in build_nodes_args1:
            result = build_nodes_args1[ kind ](
                source_ref = source_ref
            )
        elif kind == "Pass":
            result = None
        else:
            assert False, kind

        if result is None and allow_none:
            return None

        assert isinstance( result, NodeBase ), result

        return result
    except SyntaxError:
        raise
    except:
        warning( "Problem at '%s' with %s." % ( source_ref, ast.dump( node ) ) )
        raise
        


src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationTryExceptStatements.py   Nuitka(Download)
 
 
from .Helpers import(
    makeStatementsSequenceFromStatement,
    makeStatementsSequence,
 
        exception_types = buildNode(
            provider   = provider,
            node       = exception_expression,
            source_ref = source_ref,

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationTryExceptStatements.py   Nuitka(Download)
 
 
from .Helpers import (
    makeStatementsSequence,
    buildStatementsNode,
 
        exception_types = buildNode(
            provider   = provider,
            node       = exception_expression,
            source_ref = source_ref,

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationAssignmentStatements.py   Nuitka(Download)
from nuitka.nodes.SliceNodes import ExpressionSliceLookup
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeStatementsSequenceOrStatement,
 
        if dim_kind == "Slice":
            lower = buildNode( provider, dim.lower, source_ref, True )
            upper = buildNode( provider, dim.upper, source_ref, True )
            step = buildNode( provider, dim.step, source_ref, True )
        elif dim_kind == "Index":
            element = buildNode(
                provider   = provider,
                node       = dim.value,
                source_ref = source_ref

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationAssignmentStatements.py   Nuitka(Download)
from nuitka.nodes.SliceNodes import ExpressionSliceLookup
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    makeStatementsSequenceOrStatement,
 
        if dim_kind == "Slice":
            lower = buildNode( provider, dim.lower, source_ref, True )
            upper = buildNode( provider, dim.upper, source_ref, True )
            step = buildNode( provider, dim.step, source_ref, True )
        elif dim_kind == "Index":
            element = buildNode(
                provider   = provider,
                node       = dim.value,
                source_ref = source_ref

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationPrintStatements.py   Nuitka(Download)
from nuitka.nodes.PrintNodes import StatementPrint
 
from .Helpers import (
    buildNodeList,
    buildNode
        newline    = node.nl,
        dest       = buildNode(
            provider   = provider,
            node       = node.dest,
            source_ref = source_ref,

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationContractionExpressions.py   Nuitka(Download)
from .ReformulationBooleanExpressions import buildAndNode
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    mergeStatements,
                ),
                buildNode(
                    provider   = function_body,
                    node       = node.elt,
                    source_ref = source_ref
            current_body = emit_class(
                buildNode(
                    provider   = function_body,
                    node       = node.elt,
                    source_ref = source_ref
            ),
            key = buildNode(
                provider   = function_body,
                node       = node.key,
                source_ref = source_ref,
            ),
            value = buildNode(
                provider   = function_body,

src/n/u/Nuitka-0.5.1.5/nuitka/tree/ReformulationContractionExpressions.py   Nuitka(Download)
from .ReformulationBooleanExpressions import buildAndNode
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    mergeStatements,
                ),
                buildNode(
                    provider   = function_body,
                    node       = node.elt,
                    source_ref = source_ref
            current_body = emit_class(
                buildNode(
                    provider   = function_body,
                    node       = node.elt,
                    source_ref = source_ref
            ),
            key = buildNode(
                provider   = function_body,
                node       = node.key,
                source_ref = source_ref,
            ),
            value = buildNode(
                provider   = function_body,

src/n/u/Nuitka-0.5.1.5/nuitka/tree/Building.py   Nuitka(Download)
 
# Some helpers.
from .Helpers import (
    makeStatementsSequenceOrStatement,
    makeSequenceCreationOrConstant,
 
    return StatementConditional(
        condition  = buildNode( provider, node.test, source_ref ),
        yes_branch = buildStatementsNode(
            provider   = provider,
    if Utils.python_version < 300:
        return StatementRaiseException(
            exception_type  = buildNode( provider, node.type, source_ref, allow_none = True ),
            exception_value = buildNode( provider, node.inst, source_ref, allow_none = True ),
            exception_trace = buildNode( provider, node.tback, source_ref, allow_none = True ),

src/n/u/Nuitka-HEAD/nuitka/tree/Building.py   Nuitka(Download)
 
# Some helpers.
from .Helpers import (
    makeStatementsSequenceOrStatement,
    makeSequenceCreationOrConstant,
 
    return StatementConditional(
        condition  = buildNode( provider, node.test, source_ref ),
        yes_branch = buildStatementsNode(
            provider   = provider,
    if Utils.python_version < 300:
        return StatementRaiseException(
            exception_type  = buildNode( provider, node.type, source_ref, allow_none = True ),
            exception_value = buildNode( provider, node.inst, source_ref, allow_none = True ),
            exception_trace = buildNode( provider, node.tback, source_ref, allow_none = True ),

src/n/u/Nuitka-HEAD/nuitka/tree/ReformulationLambdaExpressions.py   Nuitka(Download)
)
 
from .Helpers import (
    makeStatementsSequenceFromStatement,
    mergeStatements,
 
    body = buildNode(
        provider   = function_body,
        node       = node.body,
        source_ref = source_ref,

  1 | 2 | 3 | 4  Next