unsuccussful navigation; we stop at this point
This commit is contained in:
parent
bc6613ec01
commit
5144a720ba
41198
build_result.log
Normal file
41198
build_result.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.sergeych.lyng.idea.completion
|
package net.sergeych.lyng.idea.completion
|
||||||
|
|
||||||
import LyngAstManager
|
|
||||||
import com.intellij.codeInsight.completion.*
|
import com.intellij.codeInsight.completion.*
|
||||||
import com.intellij.codeInsight.lookup.LookupElementBuilder
|
import com.intellij.codeInsight.lookup.LookupElementBuilder
|
||||||
import com.intellij.icons.AllIcons
|
import com.intellij.icons.AllIcons
|
||||||
@ -36,6 +35,7 @@ import net.sergeych.lyng.idea.LyngLanguage
|
|||||||
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
||||||
import net.sergeych.lyng.idea.settings.LyngFormatterSettings
|
import net.sergeych.lyng.idea.settings.LyngFormatterSettings
|
||||||
import net.sergeych.lyng.idea.util.DocsBootstrap
|
import net.sergeych.lyng.idea.util.DocsBootstrap
|
||||||
|
import net.sergeych.lyng.idea.util.LyngAstManager
|
||||||
import net.sergeych.lyng.idea.util.TextCtx
|
import net.sergeych.lyng.idea.util.TextCtx
|
||||||
import net.sergeych.lyng.miniast.*
|
import net.sergeych.lyng.miniast.*
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package net.sergeych.lyng.idea.navigation
|
package net.sergeych.lyng.idea.navigation
|
||||||
|
|
||||||
import LyngAstManager
|
|
||||||
import com.intellij.lang.cacheBuilder.DefaultWordsScanner
|
import com.intellij.lang.cacheBuilder.DefaultWordsScanner
|
||||||
import com.intellij.lang.cacheBuilder.WordsScanner
|
import com.intellij.lang.cacheBuilder.WordsScanner
|
||||||
import com.intellij.lang.findUsages.FindUsagesProvider
|
import com.intellij.lang.findUsages.FindUsagesProvider
|
||||||
@ -26,6 +25,7 @@ import com.intellij.psi.PsiElement
|
|||||||
import com.intellij.psi.tree.TokenSet
|
import com.intellij.psi.tree.TokenSet
|
||||||
import net.sergeych.lyng.idea.highlight.LyngLexer
|
import net.sergeych.lyng.idea.highlight.LyngLexer
|
||||||
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
||||||
|
import net.sergeych.lyng.idea.util.LyngAstManager
|
||||||
import net.sergeych.lyng.miniast.DocLookupUtils
|
import net.sergeych.lyng.miniast.DocLookupUtils
|
||||||
|
|
||||||
class LyngFindUsagesProvider : FindUsagesProvider {
|
class LyngFindUsagesProvider : FindUsagesProvider {
|
||||||
|
|||||||
@ -17,10 +17,10 @@
|
|||||||
|
|
||||||
package net.sergeych.lyng.idea.navigation
|
package net.sergeych.lyng.idea.navigation
|
||||||
|
|
||||||
import LyngAstManager
|
|
||||||
import com.intellij.icons.AllIcons
|
import com.intellij.icons.AllIcons
|
||||||
import com.intellij.ide.IconProvider
|
import com.intellij.ide.IconProvider
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
|
import net.sergeych.lyng.idea.util.LyngAstManager
|
||||||
import net.sergeych.lyng.miniast.DocLookupUtils
|
import net.sergeych.lyng.miniast.DocLookupUtils
|
||||||
import javax.swing.Icon
|
import javax.swing.Icon
|
||||||
|
|
||||||
|
|||||||
@ -17,13 +17,13 @@
|
|||||||
|
|
||||||
package net.sergeych.lyng.idea.navigation
|
package net.sergeych.lyng.idea.navigation
|
||||||
|
|
||||||
import LyngAstManager
|
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.util.TextRange
|
import com.intellij.openapi.util.TextRange
|
||||||
import com.intellij.psi.*
|
import com.intellij.psi.*
|
||||||
import com.intellij.psi.search.FilenameIndex
|
import com.intellij.psi.search.FilenameIndex
|
||||||
import com.intellij.psi.search.GlobalSearchScope
|
import com.intellij.psi.search.GlobalSearchScope
|
||||||
import net.sergeych.lyng.highlight.offsetOf
|
import net.sergeych.lyng.highlight.offsetOf
|
||||||
|
import net.sergeych.lyng.idea.util.LyngAstManager
|
||||||
import net.sergeych.lyng.idea.util.TextCtx
|
import net.sergeych.lyng.idea.util.TextCtx
|
||||||
import net.sergeych.lyng.miniast.*
|
import net.sergeych.lyng.miniast.*
|
||||||
|
|
||||||
|
|||||||
@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
package net.sergeych.lyng.idea.navigation
|
package net.sergeych.lyng.idea.navigation
|
||||||
|
|
||||||
import LyngAstManager
|
|
||||||
import com.intellij.patterns.PlatformPatterns
|
import com.intellij.patterns.PlatformPatterns
|
||||||
import com.intellij.psi.*
|
import com.intellij.psi.*
|
||||||
import com.intellij.util.ProcessingContext
|
import com.intellij.util.ProcessingContext
|
||||||
import net.sergeych.lyng.idea.LyngLanguage
|
import net.sergeych.lyng.idea.LyngLanguage
|
||||||
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
import net.sergeych.lyng.idea.highlight.LyngTokenTypes
|
||||||
|
import net.sergeych.lyng.idea.util.LyngAstManager
|
||||||
import net.sergeych.lyng.miniast.DocLookupUtils
|
import net.sergeych.lyng.miniast.DocLookupUtils
|
||||||
|
|
||||||
class LyngPsiReferenceContributor : PsiReferenceContributor() {
|
class LyngPsiReferenceContributor : PsiReferenceContributor() {
|
||||||
|
|||||||
@ -15,23 +15,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
a/*
|
|
||||||
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
package net.sergeych.lyng.idea.util
|
package net.sergeych.lyng.idea.util
|
||||||
|
|
||||||
import com.intellij.openapi.util.Key
|
import com.intellij.openapi.util.Key
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2025 Sergey S. Chernov real.sergeych@gmail.com
|
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -138,7 +138,7 @@ data class ArgsDeclaration(val params: List<Item>, val endTokenType: Token.Type)
|
|||||||
} else {
|
} else {
|
||||||
val value = if (hp < callArgs.size) callArgs[hp++]
|
val value = if (hp < callArgs.size) callArgs[hp++]
|
||||||
else a.defaultValue?.execute(scope)
|
else a.defaultValue?.execute(scope)
|
||||||
?: scope.raiseIllegalArgument("too few arguments for the call")
|
?: scope.raiseIllegalArgument("too few arguments for the call (${arguments.list})")
|
||||||
assign(a, value)
|
assign(a, value)
|
||||||
}
|
}
|
||||||
i++
|
i++
|
||||||
|
|||||||
@ -366,6 +366,7 @@ suspend fun applyLyngHighlightToTextAst(text: String): String {
|
|||||||
when (d) {
|
when (d) {
|
||||||
is MiniFunDecl -> putName(d.nameStart, d.name, "hl-fn")
|
is MiniFunDecl -> putName(d.nameStart, d.name, "hl-fn")
|
||||||
is MiniClassDecl -> putName(d.nameStart, d.name, "hl-class")
|
is MiniClassDecl -> putName(d.nameStart, d.name, "hl-class")
|
||||||
|
is net.sergeych.lyng.miniast.MiniEnumDecl -> putName(d.nameStart, d.name, "hl-class")
|
||||||
is net.sergeych.lyng.miniast.MiniValDecl -> putName(d.nameStart, d.name, if (d.mutable) "hl-var" else "hl-val")
|
is net.sergeych.lyng.miniast.MiniValDecl -> putName(d.nameStart, d.name, if (d.mutable) "hl-var" else "hl-val")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -404,6 +405,7 @@ suspend fun applyLyngHighlightToTextAst(text: String): String {
|
|||||||
}
|
}
|
||||||
is net.sergeych.lyng.miniast.MiniValDecl -> addTypeSegments(d.type)
|
is net.sergeych.lyng.miniast.MiniValDecl -> addTypeSegments(d.type)
|
||||||
is MiniClassDecl -> {}
|
is MiniClassDecl -> {}
|
||||||
|
is net.sergeych.lyng.miniast.MiniEnumDecl -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2025 Sergey S. Chernov real.sergeych@gmail.com
|
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -127,7 +127,7 @@ fun ReferencePage() {
|
|||||||
Ul({ classes("mt-2") }) {
|
Ul({ classes("mt-2") }) {
|
||||||
d.members.forEach { m ->
|
d.members.forEach { m ->
|
||||||
when (m) {
|
when (m) {
|
||||||
is MiniMemberFunDecl, -> {
|
is MiniMemberFunDecl -> {
|
||||||
val params = m.params.joinToString(", ") { p ->
|
val params = m.params.joinToString(", ") { p ->
|
||||||
val ts = typeOf(p.type)
|
val ts = typeOf(p.type)
|
||||||
if (ts.isNotBlank()) "${p.name}${ts}" else p.name
|
if (ts.isNotBlank()) "${p.name}${ts}" else p.name
|
||||||
@ -150,6 +150,10 @@ fun ReferencePage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
is MiniEnumDecl -> {
|
||||||
|
Div { Text("enum ${d.name} { ${d.entries.joinToString(", ")} }") }
|
||||||
|
d.doc?.summary?.let { Small({ classes("text-muted") }) { Text(it) } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user