mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
uast.md: mention UastHintedVisitorAdapter inspection
This commit is contained in:
parent
7577f0ec4e
commit
8e65b2ec85
@ -1,9 +1,9 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
|
||||
<link-summary>Handle different JVM languages syntax trees with a single implementation.</link-summary>
|
||||
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
|
||||
# UAST - Unified Abstract Syntax Tree
|
||||
|
||||
<link-summary>Handle different JVM languages syntax trees with a single implementation.</link-summary>
|
||||
|
||||
UAST (Unified Abstract Syntax Tree) is an abstraction layer on the [PSI](psi_elements.md) of different programming languages targeting the JVM (Java Virtual Machine).
|
||||
It provides a unified API for working with common language elements like classes and method declarations, literal values, and control flow operators.
|
||||
|
||||
@ -184,6 +184,8 @@ The latter is preferable as it offers better performance and more predictable re
|
||||
|
||||
As a general rule, it's recommended to abstain from using `UastVisitor`: if you don't need to process many `UElement`s of different types and if the structure of elements is not very important, then it is better to walk the PSI-tree using `PsiElementVisitor` and [convert](#psi-to-uast-conversion) each `PsiElement` to its corresponding UAST explicitly via `UastContext.toUElement()`.
|
||||
|
||||
See also inspection <control>Plugin DevKit | Code | 'UastHintedVisitorAdapter' hints problems</control> (2024.2+).
|
||||
|
||||
## UAST Performance Hints
|
||||
|
||||
UAST is not a zero-cost abstraction: [some methods](https://youtrack.jetbrains.com/issue/KT-29856) could be unexpectedly expensive for some languages,
|
||||
|
Loading…
x
Reference in New Issue
Block a user