File tree Expand file tree Collapse file tree
unified/ql/lib/codeql/unified/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55private import unified
66
77module Public {
8+ /**
9+ * A logical 'and' expression with short-circuiting.
10+ */
11+ class LogicalAndExpr extends BinaryExpr {
12+ LogicalAndExpr ( ) { this .getOperator ( ) .getValue ( ) = "&&" }
13+
14+ Expr getAnOperand ( ) { result = [ this .getLeft ( ) , this .getRight ( ) ] }
15+ }
16+
17+ /**
18+ * Declaration of a local or top-level variable.
19+ */
20+ class LocalVariableDeclaration extends VariableDeclaration {
21+ private Block block ;
22+
23+ LocalVariableDeclaration ( ) { this = block .getStmt ( _) }
24+
25+ /** Gets the block in which this variable is declared. */
26+ Block getDeclaringBlock ( ) { result = block }
27+ }
28+
29+ /**
30+ * Declaration of a local or top-level function.
31+ */
32+ class LocalFunctionDeclaration extends FunctionDeclaration {
33+ private Block block ;
34+
35+ LocalFunctionDeclaration ( ) { this = block .getStmt ( _) }
36+
37+ /** Gets the block in which this function is declared. */
38+ Block getDeclaringBlock ( ) { result = block }
39+ }
40+
841 /**
942 * A comment appearing in the source code.
1043 */
You can’t perform that action at this time.
0 commit comments