File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed
swift/ql/lib/codeql/swift/elements/expr Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1- // generated by codegen/codegen.py, remove this comment if you wish to edit this file
21private import codeql.swift.generated.expr.PostfixUnaryExpr
2+ private import codeql.swift.elements.expr.Expr
3+ private import codeql.swift.elements.decl.AbstractFunctionDecl
34
4- class PostfixUnaryExpr extends Generated:: PostfixUnaryExpr { }
5+ /**
6+ * A Swift postfix unary expression, that is, a unary expression that appears
7+ * after its operand. For example:
8+ * ```
9+ * x!
10+ * ```
11+ */
12+ class PostfixUnaryExpr extends Generated:: PostfixUnaryExpr {
13+ /**
14+ * Gets the operand (expression) of this postfix unary expression.
15+ */
16+ Expr getOperand ( ) { result = this .getAnArgument ( ) .getExpr ( ) }
17+
18+ /**
19+ * Gets the operator of this postfix unary expression (the function that is called).
20+ */
21+ AbstractFunctionDecl getOperator ( ) { result = this .getStaticTarget ( ) }
22+ }
Original file line number Diff line number Diff line change 11private import codeql.swift.generated.expr.PrefixUnaryExpr
22private import codeql.swift.elements.expr.Expr
3+ private import codeql.swift.elements.decl.AbstractFunctionDecl
34
5+ /**
6+ * A Swift prefix unary expression, that is, a unary expression that appears
7+ * before its operand. For example:
8+ * ```
9+ * -x
10+ * ```
11+ */
412class PrefixUnaryExpr extends Generated:: PrefixUnaryExpr {
13+ /**
14+ * Gets the operand (expression) of this prefix unary expression.
15+ */
516 Expr getOperand ( ) { result = this .getAnArgument ( ) .getExpr ( ) }
17+
18+ /**
19+ * Gets the operator of this prefix unary expression (the function that is called).
20+ */
21+ AbstractFunctionDecl getOperator ( ) { result = this .getStaticTarget ( ) }
622}
You can’t perform that action at this time.
0 commit comments