mirror of
https://github.com/github/codeql.git
synced 2026-08-03 00:43:00 +02:00
28 lines
676 B
Plaintext
28 lines
676 B
Plaintext
class Annotation extends @annotation {
|
|
string toString() { result = "annotation" }
|
|
}
|
|
|
|
class Method extends @method {
|
|
string toString() { result = "method" }
|
|
}
|
|
|
|
class Expr extends @expr {
|
|
string toString() { result = "expr" }
|
|
}
|
|
|
|
class ParExpr extends Expr, @parexpr {
|
|
override string toString() { result = "(...)" }
|
|
}
|
|
|
|
predicate parExprGetExpr(ParExpr pe, Expr e) { exprs(e, _, _, pe, _) }
|
|
|
|
from Annotation parentid, Method id2, Expr oldvalue, Expr value
|
|
where
|
|
annotValue(parentid, id2, oldvalue) and
|
|
if oldvalue instanceof ParExpr
|
|
then
|
|
parExprGetExpr+(oldvalue, value) and
|
|
not value instanceof ParExpr
|
|
else value = oldvalue
|
|
select parentid, id2, value
|