mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
forward toString() etc. predicates from YamlNode to Locatable
This commit is contained in:
@@ -51,7 +51,7 @@ private predicate isNotNeeded(Locatable el) {
|
||||
private string getQlClass(Locatable el) {
|
||||
result = "[" + el.getPrimaryQlClasses() + "] "
|
||||
// Alternative implementation -- do not delete. It is useful for QL class discovery.
|
||||
// not el.getAPrimaryQlClass() = "???" and result = "[" + getPrimaryQlClasses() + "] " or el.getAPrimaryQlClass() = "???" and result = "??[" + concat(el.getAQlClass(), ",") + "] "
|
||||
// not el.getAPrimaryQlClass() = "???" and result = "[" + el.getPrimaryQlClasses() + "] " or el.getAPrimaryQlClass() = "???" and result = "??[" + concat(el.getAQlClass(), ",") + "] "
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,6 +48,15 @@ private module YamlSig implements LibYaml::InputSig {
|
||||
|
||||
import LibYaml::Make<YamlSig>
|
||||
|
||||
// private class to forward the `toString` etc. predicates from `YamlNode` to `Locatable`.
|
||||
private class MyYmlNode extends Locatable instanceof YamlNode {
|
||||
override string getAPrimaryQlClass() { result = YamlNode.super.getAPrimaryQlClass() }
|
||||
|
||||
override Location getLocation() { result = YamlNode.super.getLocation() }
|
||||
|
||||
override string toString() { result = YamlNode.super.toString() }
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for YamlNode */
|
||||
deprecated class YAMLNode = YamlNode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user