CodeQL library for Python
codeql/python-all 2.1.2-dev (changelog, source)
Search

Class BooleanLiteral

A boolean named constant, either True or False

Import path

import python

Direct supertypes

Indirect supertypes

Known direct subtypes

Inherited predicates

booleanValuefrom ImmutableLiteral
contains

Whether this contains inner syntactically

from AstNode
containsInScope

Whether this contains inner syntactically and inner has the same scope as this

from AstNode
defines

Whether this expression defines variable v If doing dataflow, then consider using SsaVariable.getDefinition() for more precision.

from Name
deletes

Whether this expression deletes variable v. If doing dataflow, then consider using SsaVariable.getDefinition() for more precision.

from Name
getAChildNode

Gets a child node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt().

from Expr
getAFlowNode

Gets a flow node corresponding directly to this node. NOTE: For some statements and other purely syntactic elements, there may not be a ControlFlowNode

from NameConstant
getASubExpression

Gets an immediate (non-nested) sub-expression of this expression

from NameConstant
getCtx

Gets the context of this name expression.

from Name_
getEnclosingModule

Gets the module in which this expression occurs

from Expr
getIdfrom Name
getLiteralObjectfrom ImmutableLiteral
getLiteralValuefrom ImmutableLiteral
getLocationfrom Expr
getParent

Gets a parent of this expression

from Name_
getParentNode

Gets the parent node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt() applied to the parent.

from AstNode
getScope

Gets the scope of this expression

from Expr
getVariable

Gets the variable of this name expression.

from Name_
hasSideEffects

Whether this expression may have a side effect (as determined purely from its syntax)

from Expr
isArtificial

Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source

from NameConstant
isConstant

Whether this expression is a constant

from NameConstant
isDefinition

Whether this expression is a definition

from Name
isDeletion

Whether this expression is a deletion

from Name
isParenthesised

Whether the parenthesised property of this expression is true.

from Expr_
isParenthesized

Whether the parenthesized property of this expression is true.

from Expr
isUse

Whether this expression is a use

from Name
pointsTo

Gets a value that this expression might “point-to”.

from Expr
pointsTo

Holds if this expression might “point-to” to value.

from Expr
pointsTo

Holds if this expression might “point-to” to value which is from origin.

from Expr
pointsTo

Holds if this expression might “point-to” to value which is from origin in the given context.

from Expr
refersTo

NOTE: refersTo will be deprecated in 2019. Use pointsTo instead. Equivalent to this.refersTo(value, _)

from Expr
refersTo

NOTE: refersTo will be deprecated in 2019. Use pointsTo instead. Holds if this expression might “refer-to” to value which is from origin Unlike this.refersTo(value, _, origin), this predicate includes results where the class cannot be inferred.

from Expr
refersTo

NOTE: refersTo will be deprecated in 2019. Use pointsTo instead. Gets what this expression might “refer-to”. Performs a combination of localized (intra-procedural) points-to analysis and global module-level analysis. This points-to analysis favours precision over recall. It is highly precise, but may not provide information for a significant number of flow-nodes. If the class is unimportant then use refersTo(value) or refersTo(value, origin) instead. NOTE: For complex dataflow, involving multiple stages of points-to analysis, it may be more precise to use ControlFlowNode.refersTo(...) instead.

from Expr
refersTo

NOTE: refersTo will be deprecated in 2019. Use pointsTo instead. Gets what this expression might “refer-to” in the given context.

from Expr
toString

Gets a textual representation of this element.

from NameConstant
uses

Whether this expression is a use of variable v If doing dataflow, then consider using SsaVariable.getAUse() for more precision.

from Name