File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
powershell/ql/lib/semmle/code/powershell Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ abstract private class AbstractFunction extends Ast {
69
69
EntryBasicBlock getEntryBasicBlock ( ) { result .getScope ( ) = this .getBody ( ) }
70
70
}
71
71
72
+ final class Function = AbstractFunction ;
73
+
72
74
/**
73
75
* A function definition.
74
76
*/
@@ -114,4 +116,12 @@ class Constructor extends Method {
114
116
Constructor ( ) { this .isConstructor ( ) }
115
117
}
116
118
117
- final class Function = FunctionBase ;
119
+ class TopLevel extends AbstractFunction instanceof TopLevelScriptBlock {
120
+ final override string getName ( ) { result = "toplevel" }
121
+
122
+ final override ScriptBlock getBody ( ) { result = this }
123
+
124
+ final override Parameter getFunctionParameter ( int i ) { none ( ) }
125
+
126
+ final override Type getDeclaringType ( ) { none ( ) }
127
+ }
You can’t perform that action at this time.
0 commit comments