From 87bf6927758e270454df5ea4106d3d17aaf71ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 18 Mar 2021 14:53:25 +0100 Subject: [PATCH] uast.md: fix anchor links --- topics/basics/architectural_overview/uast.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/topics/basics/architectural_overview/uast.md b/topics/basics/architectural_overview/uast.md index ccdebbacf..bfae8e0fc 100644 --- a/topics/basics/architectural_overview/uast.md +++ b/topics/basics/architectural_overview/uast.md @@ -2,7 +2,7 @@ -UAST (Unified Abstract Syntax Tree) is an abstraction layer on the [PSI](psi_elements.md) of different JVM Languages. +UAST (Unified Abstract Syntax Tree) is an abstraction layer on the [PSI](psi_elements.md) of different JVM languages. It provides a unified API for working with common language elements like classes and method declarations, literal values, and control flow operators. ## Motivation @@ -73,7 +73,7 @@ To convert `PsiElement` to the specific `UElement`, use one of the following app > {type="note"} -### UAST to PSI Conversion: `sourcePsi` and `javaPsi` +### UAST to PSI Conversion Sometimes it's required to get from the `UElement` back to sources of the underlying language. For that purpose, `UElement#sourcePsi` property returns the corresponding `PsiElement` of the original language. @@ -159,13 +159,13 @@ This _"implements"_ is considered deprecated and might be removed in the future. Also, there is `UElement#psi` property; it returns the same element as `javaPsi` or the `sourcePsi`. As it is hard to guess what will be returned, it is also deprecated. -Thus `sourcePsi` and `javaPsi` should be the only ways to obtain `PsiElement` from `UElement`. See the [corresponding section](#uast-to-psi-conversion-and). +Thus `sourcePsi` and `javaPsi` should be the only ways to obtain `PsiElement` from `UElement`. See the [corresponding section](#uast-to-psi-conversion). ### Should I use `UMethod` or `PsiMethod`, `UClass` or `PsiClass` ? UAST provides a unified way to represent JVM compatible declarations via `UMethod`, `UField`, `UClass`, and so on. But at the same time, all JVM language plugins implement `PsiMethod`, `PsiClass`, and so on to be compatible with Java. -These implementations could be [obtained](#uast-to-psi-conversion-and) via `UElement#javaPsi` property. +These implementations could be [obtained](#uast-to-psi-conversion) via `UElement#javaPsi` property. So the question is: "What should I use to represent the Java-declaration in my code?". The answer is: We encourage using `PsiMethod`, `PsiClass` as common interfaces for Java-declarations regardless of the JVM language