Files
codeql/rust/ql/lib/codeql/rust/elements/internal/generated/PathAstNode.qll
2024-11-29 15:55:51 +01:00

37 lines
1.2 KiB
Plaintext
Generated

// generated by codegen, do not edit
/**
* This module provides the generated definition of `PathAstNode`.
* 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.internal.ResolvableImpl::Impl as ResolvableImpl
/**
* INTERNAL: This module contains the fully generated definition of `PathAstNode` and should not
* be referenced directly.
*/
module Generated {
/**
* An AST element wrapping a path (`PathExpr`, `RecordExpr`, `PathPat`, `RecordPat`, `TupleStructPat`).
* INTERNAL: Do not reference the `Generated::PathAstNode` class directly.
* Use the subclass `PathAstNode`, where the following predicates are available.
*/
class PathAstNode extends Synth::TPathAstNode, ResolvableImpl::Resolvable {
/**
* Gets the path of this path ast node, if it exists.
*/
Path getPath() {
result =
Synth::convertPathFromRaw(Synth::convertPathAstNodeToRaw(this).(Raw::PathAstNode).getPath())
}
/**
* Holds if `getPath()` exists.
*/
final predicate hasPath() { exists(this.getPath()) }
}
}