generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4eefee
commit 2dad6e0
Showing
12 changed files
with
99 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 19 additions & 20 deletions
39
gen/com/github/themartdev/intellijgleam/lang/parser/GleamParser.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
src/test/kotlin/com/github/themartdev/intellijgleam/GleamParserTest.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/test/kotlin/com/github/themartdev/intellijgleam/GleamTestUtil.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,5 @@ class GleamLexerTest { | |
println("${lexer.tokenType}: ${lexer.tokenText}") | ||
lexer.advance() | ||
} | ||
|
||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/kotlin/com/github/themartdev/intellijgleam/parser/GleamParsingTestCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.github.themartdev.intellijgleam.parser | ||
|
||
import com.github.themartdev.intellijgleam.lang.parser.GleamParserDefinition | ||
import com.intellij.testFramework.ParsingTestCase | ||
|
||
abstract class GleamParsingTestCase : ParsingTestCase( | ||
"", | ||
"gleam", | ||
true, | ||
GleamParserDefinition() | ||
) { | ||
override fun getTestDataPath(): String = "src/test/testData/parser" | ||
|
||
override fun skipSpaces(): Boolean = false | ||
|
||
override fun includeRanges(): Boolean = true | ||
|
||
protected fun assertParsedCorrectly() { | ||
doTest(true, true) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/test/kotlin/com/github/themartdev/intellijgleam/parser/SmokeTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.github.themartdev.intellijgleam.parser | ||
|
||
class SmokeTest : GleamParsingTestCase() { | ||
override fun getTestDataPath(): String = super.getTestDataPath() + "/smoke" | ||
|
||
fun testSmoke1() = assertParsedCorrectly() | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import gleam/io | ||
|
||
pub fn main() { | ||
io.println("Hello, Joe!") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Gleam File(0,62) | ||
GleamTopLevelStatementImpl(TOP_LEVEL_STATEMENT)(0,15) | ||
GleamImportStatementImpl(IMPORT_STATEMENT)(0,15) | ||
PsiElement(import)('import')(0,6) | ||
PsiWhiteSpace(' ')(6,7) | ||
GleamModuleImpl(MODULE)(7,15) | ||
PsiElement(IDENTIFIER)('gleam')(7,12) | ||
PsiElement(/)('/')(12,13) | ||
PsiElement(IDENTIFIER)('io')(13,15) | ||
PsiWhiteSpace('\n\n')(15,17) | ||
GleamTopLevelStatementImpl(TOP_LEVEL_STATEMENT)(17,62) | ||
GleamFunctionImpl(FUNCTION)(17,62) | ||
GleamVisibilityModifierImpl(VISIBILITY_MODIFIER)(17,20) | ||
PsiElement(pub)('pub')(17,20) | ||
PsiWhiteSpace(' ')(20,21) | ||
PsiElement(fn)('fn')(21,23) | ||
PsiWhiteSpace(' ')(23,24) | ||
GleamFunctionNameDefinitionImpl(FUNCTION_NAME_DEFINITION)(24,28) | ||
PsiElement(IDENTIFIER)('main')(24,28) | ||
GleamFunctionParametersImpl(FUNCTION_PARAMETERS)(28,30) | ||
PsiElement(()('(')(28,29) | ||
PsiElement())(')')(29,30) | ||
PsiWhiteSpace(' ')(30,31) | ||
GleamFunctionBodyImpl(FUNCTION_BODY)(31,62) | ||
PsiElement({)('{')(31,32) | ||
PsiWhiteSpace('\n ')(32,35) | ||
GleamExpressionSeqImpl(EXPRESSION_SEQ)(35,60) | ||
GleamCallExprImpl(CALL_EXPR)(35,60) | ||
GleamAccessExprImpl(ACCESS_EXPR)(35,45) | ||
GleamReferenceExprImpl(REFERENCE_EXPR)(35,37) | ||
PsiElement(IDENTIFIER)('io')(35,37) | ||
PsiElement(.)('.')(37,38) | ||
GleamLabelImpl(LABEL)(38,45) | ||
PsiElement(IDENTIFIER)('println')(38,45) | ||
GleamArgumentsImpl(ARGUMENTS)(45,60) | ||
PsiElement(()('(')(45,46) | ||
GleamArgumentImpl(ARGUMENT)(46,59) | ||
GleamLiteralExprImpl(LITERAL_EXPR)(46,59) | ||
GleamStringLiteralImpl(STRING_LITERAL)(46,59) | ||
PsiElement(OPEN_QUOTE)('"')(46,47) | ||
PsiElement(REGULAR_STRING_PART)('Hello, Joe!')(47,58) | ||
PsiElement(")('"')(58,59) | ||
PsiElement())(')')(59,60) | ||
PsiWhiteSpace('\n')(60,61) | ||
PsiElement(})('}')(61,62) |