mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
54 lines
1.5 KiB
Plaintext
Generated
54 lines
1.5 KiB
Plaintext
Generated
// generated by codegen, do not edit
|
|
/**
|
|
* This module provides the generated definition of `Path`.
|
|
* INTERNAL: Do not import directly.
|
|
*/
|
|
|
|
private import codeql.rust.elements.internal.generated.Synth
|
|
private import codeql.rust.elements.internal.generated.Raw
|
|
import codeql.rust.elements.Path
|
|
import codeql.rust.elements.PathSegment
|
|
import codeql.rust.elements.internal.ResolvableImpl::Impl as ResolvableImpl
|
|
|
|
/**
|
|
* INTERNAL: This module contains the fully generated definition of `Path` and should not
|
|
* be referenced directly.
|
|
*/
|
|
module Generated {
|
|
/**
|
|
* A path. For example:
|
|
* ```rust
|
|
* foo::bar;
|
|
* ```
|
|
* INTERNAL: Do not reference the `Generated::Path` class directly.
|
|
* Use the subclass `Path`, where the following predicates are available.
|
|
*/
|
|
class Path extends Synth::TPath, ResolvableImpl::Resolvable {
|
|
override string getAPrimaryQlClass() { result = "Path" }
|
|
|
|
/**
|
|
* Gets the qualifier of this path, if it exists.
|
|
*/
|
|
Path getQualifier() {
|
|
result = Synth::convertPathFromRaw(Synth::convertPathToRaw(this).(Raw::Path).getQualifier())
|
|
}
|
|
|
|
/**
|
|
* Holds if `getQualifier()` exists.
|
|
*/
|
|
final predicate hasQualifier() { exists(this.getQualifier()) }
|
|
|
|
/**
|
|
* Gets the part of this path, if it exists.
|
|
*/
|
|
PathSegment getPart() {
|
|
result = Synth::convertPathSegmentFromRaw(Synth::convertPathToRaw(this).(Raw::Path).getPart())
|
|
}
|
|
|
|
/**
|
|
* Holds if `getPart()` exists.
|
|
*/
|
|
final predicate hasPart() { exists(this.getPart()) }
|
|
}
|
|
}
|