File tree Expand file tree Collapse file tree
powershell/ql/lib/semmle/code/powershell Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ abstract private class AbstractFunction extends Ast {
6969 EntryBasicBlock getEntryBasicBlock ( ) { result .getScope ( ) = this .getBody ( ) }
7070}
7171
72+ final class Function = AbstractFunction ;
73+
7274/**
7375 * A function definition.
7476 */
@@ -114,4 +116,12 @@ class Constructor extends Method {
114116 Constructor ( ) { this .isConstructor ( ) }
115117}
116118
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