QL4QL: Add overlay[discard_entity] annotation

This commit is contained in:
Kasper Svendsen
2025-07-10 11:01:06 +02:00
parent bb0173c9af
commit 9de3617032

View File

@@ -2554,6 +2554,10 @@ private class LocalQArg extends AnnotationArg {
LocalQArg() { this.getValue() = "local?" }
}
private class DiscardEntityArg extends AnnotationArg {
DiscardEntityArg() { this.getValue() = "discard_entity" }
}
private class MonotonicAggregatesArg extends AnnotationArg {
MonotonicAggregatesArg() { this.getValue() = "monotonicAggregates" }
}
@@ -2641,6 +2645,15 @@ class OverlayLocalQ extends Annotation {
override string toString() { result = "overlay[local?]" }
}
/** An `overlay[discard_entity]` annotation. */
class OverlayDiscardEntity extends Annotation {
OverlayDiscardEntity() {
this.getName() = "overlay" and this.getArgs(0) instanceof DiscardEntityArg
}
override string toString() { result = "overlay[discard_entity]" }
}
/** A `language[monotonicAggregates]` annotation. */
class MonotonicAggregates extends Annotation {
MonotonicAggregates() { this.getArgs(0) instanceof MonotonicAggregatesArg }