Skip to content

Commit 023c88a

Browse files
committed
PS: Use shorter and more standard names.
1 parent efba031 commit 023c88a

32 files changed

+67
-69
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import powershell
22

3-
class ArrayExpression extends @array_expression, Expression {
3+
class ArrayExpr extends @array_expression, Expr {
44
override SourceLocation getLocation() { array_expression_location(this, result) }
55

6-
StatementBlock getStatementBlock() { array_expression(this, result) }
6+
StmtBlock getStatementBlock() { array_expression(this, result) }
77

88
override string toString() { result = "ArrayExpression at: " + this.getLocation().toString() }
99
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import powershell
22

3-
class ArrayLiteral extends @array_literal, Expression {
3+
class ArrayLiteral extends @array_literal, Expr {
44
override SourceLocation getLocation() { array_literal_location(this, result) }
55

6-
Expression getElement(int index) { array_literal_element(this, index, result) }
6+
Expr getElement(int index) { array_literal_element(this, index, result) }
77

8-
Expression getAnElement() { array_literal_element(this, _, result) }
8+
Expr getAnElement() { array_literal_element(this, _, result) }
99

1010
override string toString() { result = "ArrayLiteral at: " + this.getLocation().toString() }
1111
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import powershell
22

3-
class AssignmentStatement extends @assignment_statement, Statement {
3+
class AssignStmt extends @assignment_statement, Stmt {
44
override SourceLocation getLocation() { assignment_statement_location(this, result) }
55

66
int getKind() { assignment_statement(this, result, _, _) }
77

8-
Expression getLeftHandSide() { assignment_statement(this, _, result, _) }
8+
Expr getLeftHandSide() { assignment_statement(this, _, result, _) }
99

10-
Statement getRightHandSide() { assignment_statement(this, _, _, result) }
10+
Stmt getRightHandSide() { assignment_statement(this, _, _, result) }
1111

1212
override string toString() { result = "AssignmentStatement at: " + this.getLocation().toString() }
1313
}

powershell/ql/lib/semmle/code/powershell/Attribute.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Attribute extends @attribute, AttributeBase {
1515

1616
NamedAttributeArgument getANamedArgument() { result = this.getNamedArgument(_) }
1717

18-
Expression getPositionalArgument(int i) { attribute_positional_argument(this, i, result) }
18+
Expr getPositionalArgument(int i) { attribute_positional_argument(this, i, result) }
1919

20-
Expression getAPositionalArgument() { result = this.getPositionalArgument(_) }
20+
Expr getAPositionalArgument() { result = this.getPositionalArgument(_) }
2121
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import powershell
22

3-
class BaseConstantExpression extends @base_constant_expression, Expression { }
3+
class BaseConstExpr extends @base_constant_expression, Expr { }
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import powershell
22

3-
class BinaryExpression extends @binary_expression, Expression {
3+
class BinaryExpr extends @binary_expression, Expr {
44
override string toString() {
55
result = "...+..." // TODO
66
}
77

88
override SourceLocation getLocation() { binary_expression_location(this, result) }
99

10-
int getKind() { binary_expression(this, result, _, _) }
10+
private int getKind() { binary_expression(this, result, _, _) }
1111

12-
Expression getLeftHandSide() { binary_expression(this, _, result, _) }
12+
Expr getLeft() { binary_expression(this, _, result, _) }
1313

14-
Expression getRightHandSide() { binary_expression(this, _, _, result) }
14+
Expr getRight() { binary_expression(this, _, _, result) }
1515
}

powershell/ql/lib/semmle/code/powershell/Command.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import powershell
22

3-
class Command extends @command, CommandBase {
3+
class Cmd extends @command, CmdBase {
44
override string toString() { result = this.getName() }
55

66
override SourceLocation getLocation() { command_location(this, result) }
@@ -13,11 +13,11 @@ class Command extends @command, CommandBase {
1313

1414
int getNumRedirection() { command(this, _, _, _, result) }
1515

16-
CommandElement getElement(int i) { command_command_element(this, i, result) }
16+
CmdElement getElement(int i) { command_command_element(this, i, result) }
1717

1818
Redirection getRedirection(int i) { command_redirection(this, i, result) }
1919

20-
CommandElement getAnElement() { result = this.getElement(_) }
20+
CmdElement getAnElement() { result = this.getElement(_) }
2121

2222
Redirection getARedirection() { result = this.getRedirection(_) }
2323
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import powershell
22

3-
class CommandBase extends @command_base, Statement { }
3+
class CmdBase extends @command_base, Stmt { }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import powershell
22

3-
class CommandElement extends @command_element, Ast { }
3+
class CmdElement extends @command_element, Ast { }

powershell/ql/lib/semmle/code/powershell/CommandExpression.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import powershell
22

3-
class CommandExpression extends @command_expression, CommandBase {
3+
class CmdExpr extends @command_expression, CmdBase {
44
override SourceLocation getLocation() { command_expression_location(this, result) }
55

6-
Expression getExpression() { command_expression(this, result, _) }
6+
Expr getExpression() { command_expression(this, result, _) }
77

88
int getNumRedirections() { command_expression(this, _, result) }
99

0 commit comments

Comments
 (0)