-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathScope.qll
More file actions
25 lines (20 loc) · 774 Bytes
/
Scope.qll
File metadata and controls
25 lines (20 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
overlay[local]
module;
private import codeql.ruby.AST
private import internal.AST
private import internal.Scope
private import internal.TreeSitter
/**
* A variable scope. This is either a top-level (file), a module, a class,
* or a callable.
*/
class Scope extends AstNode, TScopeType instanceof ScopeImpl {
/** Gets the outer scope, if any. */
Scope getOuterScope() { result = super.getOuterScopeImpl() }
/** Gets a variable declared in this scope. */
Variable getAVariable() { result = super.getAVariableImpl() }
/** Gets the variable named `name` declared in this scope. */
Variable getVariable(string name) { result = super.getVariableImpl(name) }
}
/** A scope in which a `self` variable exists. */
class SelfScope extends Scope, TSelfScopeType { }