Skip to content

Commit

Permalink
Fix compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNesto committed Aug 29, 2024
1 parent fd60490 commit f556e77
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/platform/mcp/at/format/AtBlock.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
package com.demonwav.mcdev.platform.mcp.at.format

import com.demonwav.mcdev.platform.mcp.at.gen.psi.AtTypes
import com.demonwav.mcdev.util.children
import com.intellij.formatting.Alignment
import com.intellij.formatting.Block
import com.intellij.formatting.Indent
import com.intellij.formatting.Spacing
import com.intellij.formatting.SpacingBuilder
import com.intellij.formatting.Wrap
import com.intellij.lang.ASTNode
import com.intellij.lang.tree.util.children
import com.intellij.psi.TokenType
import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.formatter.common.AbstractBlock
Expand Down
25 changes: 25 additions & 0 deletions src/main/kotlin/util/ast-utils.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2024 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.util

import com.intellij.lang.ASTNode

fun ASTNode.children(): Sequence<ASTNode> = generateSequence(firstChildNode) { it.treeNext }
2 changes: 1 addition & 1 deletion src/test/kotlin/platform/mcp/at/AtCompletionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import com.demonwav.mcdev.platform.PlatformType
import com.demonwav.mcdev.platform.mcp.McpModuleSettings
import com.demonwav.mcdev.platform.mcp.McpModuleType
import com.demonwav.mcdev.platform.mcp.at.AtElementFactory.Keyword
import com.demonwav.mcdev.util.runWriteActionAndWait
import com.intellij.codeInsight.lookup.Lookup
import com.intellij.openapi.application.runWriteActionAndWait
import org.intellij.lang.annotations.Language
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.BeforeEach
Expand Down

0 comments on commit f556e77

Please sign in to comment.