Skip to content

synt.expr.type_check ¤

is_into_expr ¤

is_into_expr(e: Any) -> TypeGuard[IntoExpression]

Whether the expression is an instance of IntoExpression.

Source code in synt/expr/type_check.py
def is_into_expr(e: Any) -> TypeGuard[expr.IntoExpression]:
    r"""Whether the expression is an instance of `IntoExpression`."""
    return isinstance(e, expr.IntoExpression)

is_ident ¤

Whether the expression is an identifier.

Source code in synt/expr/type_check.py
def is_ident(e: expr.Expression) -> TypeGuard[IdentifierExpr]:
    r"""Whether the expression is an identifier."""
    return e.expr_type == expr.ExprType.Identifier