Python: Make TypeParameter extend AstNode

With `AstNode` defined as a union of other classes, we don't get this for free.

(Compare with `DictItem`, which is in a similar situation.)
This commit is contained in:
Taus
2023-11-03 22:50:38 +00:00
parent 878299823c
commit f67c68da9a

View File

@@ -222,9 +222,16 @@ class StringList extends StringList_ { }
class AliasList extends AliasList_ { }
/** A generic type parameter, as seen in function, class, and type alias definitions. */
class TypeParameter extends TypeParameter_ {
class TypeParameter extends TypeParameter_, AstNode {
/** Gets a textual representation of this element */
override string toString() { result = TypeParameter_.super.toString() }
override AstNode getAChildNode() { none() }
override Scope getScope() { none() }
/** Gets the location of this element */
override Location getLocation() { result = TypeParameter_.super.getLocation() }
}
/** A list of type parameters */