├── settings.gradle
├── testData
├── lexer
│ ├── HighlightSingleSharp.txt
│ ├── HighlightForm.txt
│ ├── DispatchAndQuote.txt
│ ├── Literals.txt
│ └── SymbolsAndKeywords.txt
├── formatter
│ ├── FormatterFixes.clj
│ ├── Simple.clj
│ ├── CodeSample.clj
│ └── StyleGuide.clj
├── parser
│ ├── SimpleRecover2.txt
│ ├── InterOp.txt
│ ├── SimpleFixes.txt
│ ├── FirstAndSimple.txt
│ ├── SimpleRecover.txt
│ ├── CommentedForms.txt
│ └── MapPrefix.txt
└── highlighting
│ ├── samples.clj
│ └── ClojureFixes.clj
├── tests
└── lang
│ ├── highlighting-tests.kt
│ ├── usages-tests.kt
│ ├── refactoring-tests.kt
│ ├── test-util.kt
│ ├── formatter-tests.kt
│ └── completion-tests.kt
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── resources
├── META-INF
│ ├── MANIFEST.MF
│ ├── plugin-copyright.xml
│ └── plugin-java.xml
├── inspectionDescriptions
│ └── ClojureResolveInspection.html
├── icons
│ ├── namespace.svg
│ ├── symbol.svg
│ ├── clojureFile.svg
│ └── clojure.svg
├── liveTemplates
│ └── clojureLiveTemplates.xml
├── messages
│ └── ClojureBundle.properties
└── colorSchemes
│ ├── ClojureDefault.xml
│ └── ClojureDarcula.xml
├── .idea
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── encodings.xml
├── vcs.xml
├── kotlinc.xml
├── copyright
│ ├── profiles_settings.xml
│ └── clojure_kit.xml
├── inspectionProfiles
│ ├── profiles_settings.xml
│ └── Project_Default.xml
├── misc.xml
├── modules.xml
├── artifacts
│ ├── clojure_kit_jar.xml
│ └── clojure_kit_zip.xml
├── libraries
│ ├── Clojure.xml
│ ├── ClojureScript.xml
│ └── WellKnownClojureLibs.xml
├── compiler.xml
├── jarRepositories.xml
└── runConfigurations
│ └── All_Tests.xml
├── .gitignore
├── gen
└── org
│ └── intellij
│ └── clojure
│ └── psi
│ ├── CFun.java
│ ├── CMap.java
│ ├── CSForm.java
│ ├── CSet.java
│ ├── CVec.java
│ ├── CLVForm.java
│ ├── CRegexp.java
│ ├── CConstructor.java
│ ├── CAccess.java
│ ├── CMetadata.java
│ ├── CPForm.java
│ ├── CCommented.java
│ ├── CReaderMacro.java
│ ├── CList.java
│ ├── CForm.java
│ ├── CLiteral.java
│ ├── CKeyword.java
│ ├── CSymbol.java
│ ├── impl
│ ├── CFunImpl.java
│ ├── CMapImpl.java
│ ├── CSetImpl.java
│ ├── CVecImpl.java
│ ├── CSFormImpl.java
│ ├── CLVFormImpl.java
│ ├── CRegexpImpl.java
│ ├── CConstructorImpl.java
│ ├── CAccessImpl.java
│ ├── CPFormImpl.java
│ ├── CCommentedImpl.java
│ ├── CListImpl.java
│ ├── CMetadataImpl.java
│ ├── CLiteralImpl.java
│ ├── CReaderMacroImpl.java
│ ├── CFormImpl.java
│ ├── CKeywordImpl.java
│ └── CSymbolImpl.java
│ ├── ClojureVisitor.java
│ └── ClojureTypes.java
├── gradle.properties
├── LICENSE.md
├── .github
├── dependabot.yml
└── workflows
│ ├── release.yml
│ └── build.yml
├── clojure-kit.iml
├── src
├── org
│ └── intellij
│ │ └── clojure
│ │ └── ui
│ │ └── forms
│ │ ├── CodeStyleOtherTab.form
│ │ └── CodeStyleOtherTab.java
├── lang
│ ├── clojure-psi-api.kt
│ ├── clojure-inspections.kt
│ ├── clojure-psi-index.kt
│ ├── clojure-psi-fragment.kt
│ ├── clojure-language.kt
│ ├── clojure-parser.kt
│ └── clojure-psi-genimpl.kt
├── tools
│ ├── debugger.kt
│ └── tools.kt
└── ui
│ └── clojure-formatter-ui.kt
├── README.md
├── gradlew.bat
├── CHANGELOG.md
└── grammars
├── clojure.bnf
└── _ClojureLexer.flex
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'clojure-kit'
2 |
3 |
--------------------------------------------------------------------------------
/testData/lexer/HighlightSingleSharp.txt:
--------------------------------------------------------------------------------
1 | BAD_CHARACTER ('#')
--------------------------------------------------------------------------------
/tests/lang/highlighting-tests.kt:
--------------------------------------------------------------------------------
1 | package org.intellij.clojure.lang
2 |
3 | /**
4 | * @author gregsh
5 | */
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gregsh/Clojure-Kit/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/testData/formatter/FormatterFixes.clj:
--------------------------------------------------------------------------------
1 | ((asdf
2 | ;; This is a comment
3 | ))
4 |
5 | ;;; reformat>
6 | ((asdf
7 | ;; This is a comment
8 | ))
--------------------------------------------------------------------------------
/resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path: kotlin-runtime.jar kotlin-reflect.jar clojure-1.8.0.jar cl
3 | ojure-jsr223-1.5.1.jar
4 |
5 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea/workspace.xml
3 | .idea/dictionaries/
4 | .idea/shelf/
5 | out/
6 | binaries/
7 | build/
8 | target/
9 | classes/
10 | checkouts/
11 | .gradle/
12 | pom.xml*
13 | .lein-*
14 | .nrepl-port
15 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CFun.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CFun extends CList {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CMap.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CMap extends CPForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CSForm.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CSForm extends CForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CSet.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CSet extends CPForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CVec.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CVec extends CLVForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CLVForm.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CLVForm extends CPForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CRegexp.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CRegexp extends CLiteral {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CConstructor.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CConstructor extends CPForm {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/resources/META-INF/plugin-copyright.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/resources/inspectionDescriptions/ClojureResolveInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | | This inspection reports unresolved references. |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CAccess.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CAccess extends CSForm {
9 |
10 | @NotNull
11 | CSymbol getSymbol();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CMetadata.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CMetadata extends CElement {
9 |
10 | @Nullable
11 | CForm getForm();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CPForm.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CPForm extends CForm {
9 |
10 | @NotNull
11 | List getForms();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CCommented.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CCommented extends CElement {
9 |
10 | @Nullable
11 | CForm getForm();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CReaderMacro.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CReaderMacro extends CElement {
9 |
10 | @Nullable
11 | CSymbol getSymbol();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/testData/parser/SimpleRecover2.txt:
--------------------------------------------------------------------------------
1 | CFileImpl:a.clj
2 | CListImpl(C_LIST)
3 | PsiElement(()('(')
4 | CSymbolImpl(C_SYMBOL)
5 | PsiElement(sym)('a')
6 | PsiElement())(')')
7 | PsiErrorElement:')' unexpected
8 | PsiElement())(')')
9 | CListImpl(C_LIST)
10 | PsiElement(()('(')
11 | CSymbolImpl(C_SYMBOL)
12 | PsiElement(sym)('b')
13 | PsiElement())(')')
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CList.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CList extends CLVForm {
9 |
10 | int getTextOffset();
11 |
12 | @Nullable
13 | CSymbol getFirst();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/.idea/artifacts/clojure_kit_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/binaries
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CForm.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CForm extends CElement {
9 |
10 | @NotNull
11 | List getMetas();
12 |
13 | @NotNull
14 | List getReaderMacros();
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Available idea versions:
2 | # https://www.jetbrains.com/intellij-repository/releases
3 | # https://www.jetbrains.com/intellij-repository/snapshots
4 |
5 | pluginName=Clojure-Kit
6 | pluginVersion=2020.3.2-SNAPSHOT
7 | pluginSinceIdeaBuild=203.5981
8 | ideaVersion=2020.3
9 |
10 | javaVersion=11
11 | kotlinApiVersion=1.4
12 | gradleVersion=7.3.3
13 |
14 | clojureVersion=1.11.0-alpha3
15 | cljsVersion=1.11.4
16 |
17 | artifactsPath=build/artifacts
18 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CLiteral.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 | import com.intellij.psi.tree.IElementType;
8 |
9 | public interface CLiteral extends CSForm {
10 |
11 | @Nullable
12 | IElementType getLiteralType();
13 |
14 | @NotNull
15 | String getLiteralText();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/resources/icons/namespace.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/resources/icons/symbol.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/resources/liveTemplates/clojureLiveTemplates.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/artifacts/clojure_kit_zip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/binaries
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CKeyword.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface CKeyword extends CSForm {
9 |
10 | @NotNull
11 | CSymbol getSymbol();
12 |
13 | @NotNull
14 | String getName();
15 |
16 | @NotNull
17 | String getNamespace();
18 |
19 | @NotNull
20 | String getQualifiedName();
21 |
22 | int getTextOffset();
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/testData/parser/InterOp.txt:
--------------------------------------------------------------------------------
1 | CFileImpl:a.clj
2 | CListImpl(C_LIST)
3 | PsiElement(()('(')
4 | CAccessImpl(C_ACCESS)
5 | CSymbolImpl(C_SYMBOL)
6 | PsiElement(sym)('a')
7 | PsiElement(.)('.')
8 | PsiElement())(')')
9 | PsiWhiteSpace(' ')
10 | CListImpl(C_LIST)
11 | PsiElement(()('(')
12 | CAccessImpl(C_ACCESS)
13 | CSymbolImpl(C_SYMBOL)
14 | CSymbolImpl(C_SYMBOL)
15 | PsiElement(sym)('a')
16 | PsiElement(/)('/')
17 | PsiElement(sym)('b')
18 | PsiElement(.)('.')
19 | PsiElement())(')')
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright 2000-present Greg Shrago
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
4 | obtain a copy of the License at
5 |
6 | http://www.apache.org/licenses/LICENSE-2.0
7 |
8 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
10 | limitations under the License.
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Dependabot configuration:
2 | # https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
3 |
4 | version: 2
5 | updates:
6 | # Maintain dependencies for Gradle dependencies
7 | - package-ecosystem: "gradle"
8 | directory: "/"
9 | target-branch: "next"
10 | schedule:
11 | interval: "daily"
12 | # Maintain dependencies for GitHub Actions
13 | - package-ecosystem: "github-actions"
14 | directory: "/"
15 | target-branch: "next"
16 | schedule:
17 | interval: "daily"
18 |
--------------------------------------------------------------------------------
/.idea/libraries/Clojure.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/CSymbol.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 | import com.intellij.psi.PsiQualifiedReference;
8 |
9 | public interface CSymbol extends CSForm {
10 |
11 | @NotNull
12 | String getName();
13 |
14 | @NotNull
15 | String getQualifiedName();
16 |
17 | @Nullable
18 | CSymbol getQualifier();
19 |
20 | int getTextOffset();
21 |
22 | @NotNull
23 | PsiQualifiedReference getReference();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/testData/formatter/Simple.clj:
--------------------------------------------------------------------------------
1 | {:keyword 'value, :keywordOther 'valueOther, :namespace/keyword 'value, :keywordOther 'valueOther}
2 | [:keyword 'value, :keywordOther 'valueOther, :namespace/keyword 'value, :keywordOther 'valueOther]
3 | (:form1) (:from2)
4 |
5 | ;;; reformat> println("common = $common")
6 | ;;; reformat> println("custom = $custom")
7 |
8 | {:keyword 'value,
9 | :keywordOther 'valueOther,
10 | :namespace/keyword 'value,
11 | :keywordOther 'valueOther}
12 |
13 | [:keyword 'value,
14 | :keywordOther 'valueOther,
15 | :namespace/keyword 'value,
16 | :keywordOther 'valueOther]
17 |
18 | (:form1)
19 |
20 | (:from2)
--------------------------------------------------------------------------------
/resources/messages/ClojureBundle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2016-present Greg Shrago
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 | #
17 |
18 | clojure.inspections.group.name=Clojure
19 | inspection.name.resolve=Unresolved reference
--------------------------------------------------------------------------------
/.idea/copyright/clojure_kit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/colorSchemes/ClojureDefault.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/testData/lexer/HighlightForm.txt:
--------------------------------------------------------------------------------
1 | ( ('(')
2 | C_CALLABLE* ('abc')
3 | WHITE_SPACE (' ')
4 | : (':')
5 | C_KEYWORD* ('kwd')
6 | WHITE_SPACE (' ')
7 | ' (''')
8 | ( ('(')
9 | sym ('quoted')
10 | WHITE_SPACE (' ')
11 | sym ('xyz')
12 | ) (')')
13 | WHITE_SPACE (' ')
14 | ( ('(')
15 | C_CALLABLE* ('some.ns')
16 | C_CALLABLE* ('/')
17 | C_CALLABLE* ('fn')
18 | WHITE_SPACE (' ')
19 | : (':')
20 | C_KEYWORD* ('some.ns')
21 | C_KEYWORD* ('/')
22 | C_KEYWORD* ('kwd')
23 | WHITE_SPACE (' ')
24 | :: ('::')
25 | C_KEYWORD* ('user-kwd')
26 | WHITE_SPACE (' ')
27 | ( ('(')
28 | .- ('.-')
29 | C_CALLABLE* ('x')
30 | WHITE_SPACE (' ')
31 | ( ('(')
32 | . ('.')
33 | C_CALLABLE* ('y')
34 | WHITE_SPACE (' ')
35 | sym ('z')
36 | ) (')')
37 | ) (')')
38 | ) (')')
39 | WHITE_SPACE (' ')
40 | #_ ('#_')
41 | ( ('(')
42 | C_CALLABLE* ('comment')
43 | WHITE_SPACE (' ')
44 | ) (')')
--------------------------------------------------------------------------------
/testData/formatter/CodeSample.clj:
--------------------------------------------------------------------------------
1 | (ns ^{:author "wikibooks" :doc "Clojure Programming"} wikibooks.sample
2 | (:require [clojure.set :as set]))
3 |
4 | ;; Clojure Programming/Examples/Lazy Fibonacci
5 | (defn fib-seq [] ((fn rfib [a b] (cons a (lazy-seq (rfib b (+ a b))))) 0 1))
6 |
7 | ;; Recursive Fibonacci with any start point and the amount of numbers that you want
8 | ;; note that your 'start' parameter must be a vector with at least two numbers (the two which are your starting points)
9 | (defn fib [start range]
10 | "Creates a vector of fibonnaci numbers"
11 | (if (<= range 0)
12 | start
13 | (recur
14 | (let [subvector (subvec start (- (count start) 2))
15 | x (nth subvector 0)
16 | y (nth subvector 1)
17 | z (+ x y)]
18 | (conj start z))
19 | (- range 1))))
20 |
--------------------------------------------------------------------------------
/testData/parser/SimpleFixes.txt:
--------------------------------------------------------------------------------
1 | CFileImpl:a.clj
2 | CAccessImpl(C_ACCESS)
3 | PsiElement(.)('.')
4 | CSymbolImpl(C_SYMBOL)
5 | PsiElement(sym)('1')
6 | PsiWhiteSpace(' ')
7 | CSymbolImpl(C_SYMBOL)
8 | PsiElement(sym)('x')
9 | PsiWhiteSpace(' ')
10 | CSymbolImpl(C_SYMBOL)
11 | PsiElement(sym)('.-')
12 | PsiComment(C_LINE_COMMENT)(';comment')
13 | PsiWhiteSpace('\n')
14 | CSymbolImpl(C_SYMBOL)
15 | PsiElement(sym)('a'b')
16 | CLiteralImpl(C_LITERAL)
17 | PsiElement(string)('""')
18 | CSymbolImpl(C_SYMBOL)
19 | PsiElement(sym)('a')
20 | CLiteralImpl(C_LITERAL)
21 | PsiElement(string)('""')
22 | CSymbolImpl(C_SYMBOL)
23 | PsiElement(sym)('+')
24 | PsiWhiteSpace('\n')
25 | CLiteralImpl(C_LITERAL)
26 | PsiElement(number)('1')
27 | PsiComment(C_LINE_COMMENT)(';unclosed eof')
28 | PsiWhiteSpace('\n')
29 | PsiErrorElement:'"x' unexpected
30 | PsiElement(BAD_CHARACTER)('"x')
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/resources/colorSchemes/ClojureDarcula.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CFunImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CFunImpl extends CListImpl implements CFun {
15 |
16 | public CFunImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitFun(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CMapImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CMapImpl extends CPFormImpl implements CMap {
15 |
16 | public CMapImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitMap(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CSetImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CSetImpl extends CPFormImpl implements CSet {
15 |
16 | public CSetImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitSet(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CVecImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CVecImpl extends CLVFormImpl implements CVec {
15 |
16 | public CVecImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitVec(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CSFormImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CSFormImpl extends CFormImpl implements CSForm {
15 |
16 | public CSFormImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitSForm(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CLVFormImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CLVFormImpl extends CPFormImpl implements CLVForm {
15 |
16 | public CLVFormImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitLVForm(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CRegexpImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CRegexpImpl extends CLiteralImpl implements CRegexp {
15 |
16 | public CRegexpImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitRegexp(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CConstructorImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CConstructorImpl extends CPFormImpl implements CConstructor {
15 |
16 | public CConstructorImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitConstructor(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/testData/highlighting/samples.clj:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ; destructuring
3 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4 |
5 |
6 | (let [[a b c & d :as e] [1 2 3 4 5 6 7]]
7 | [a b c d e])
8 |
9 | ;->[1 2 3 (4 5 6 7) [1 2 3 4 5 6 7]]
10 |
11 |
12 | (let [[[x1 y1][x2 y2]] [[1 2] [3 4]]]
13 | [x1 y1 x2 y2])
14 |
15 | ;->[1 2 3 4]
16 |
17 | (let [[a b & c :as str] "asdjhhfdas"]
18 | [a b c str])
19 |
20 | ;->[\a \s (\d \j \h \h \f \d \a \s) "asdjhhfdas"]
21 |
22 | (let [{a :a, b :b, c :c, :as m :or {a 2 b 3}} {:a 5 :c 6}]
23 | [a b c m])
24 |
25 | ;->[5 3 6 {:c 6, :a 5}]
26 |
27 | (let [m {:x/a 1, :y/b 2}
28 | {:keys [x/a y/b]} m]
29 | (+ a b))
30 |
31 | ;-> 3
32 |
33 | (let [m {::x 42}
34 | {:keys [::x]} m]
35 | x )
36 |
37 | ;-> 42
38 |
39 | (let [{j :j, k :k, i :i, [r s & t :as v] :ivec, :or {i 12 j 13}}
40 | {:j 15 :k 16 :ivec [22 23 24 25]}]
41 | [i j k r s t v])
42 |
43 | ;-> [12 15 16 22 23 (24 25) [22 23 24 25]]
44 |
45 | ; clojure 1.9
46 | (let [m #:domain{:a 1, :b 2}
47 | {:domain/keys [a b]} m]
48 | [a b])
49 |
50 | ;-> [1 2]
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CAccessImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CAccessImpl extends CSFormImpl implements CAccess {
15 |
16 | public CAccessImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitAccess(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @NotNull
31 | public CSymbol getSymbol() {
32 | return PsiTreeUtil.getChildOfType(this, CSymbol.class);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CPFormImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CPFormImpl extends CFormImpl implements CPForm {
15 |
16 | public CPFormImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitPForm(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @NotNull
31 | public List getForms() {
32 | return PsiTreeUtil.getChildrenOfTypeAsList(this, CForm.class);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CCommentedImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CCommentedImpl extends CComposite implements CCommented {
15 |
16 | public CCommentedImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitCommented(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @Nullable
31 | public CForm getForm() {
32 | return PsiTreeUtil.getChildOfType(this, CForm.class);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/clojure-kit.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/resources/META-INF/plugin-java.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/resources/icons/clojureFile.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CListImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CListImpl extends CListBase implements CList {
15 |
16 | public CListImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitList(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | public int getTextOffset() {
31 | return ClojurePsiImplUtil.getTextOffset(this);
32 | }
33 |
34 | @Override
35 | @Nullable
36 | public CSymbol getFirst() {
37 | return ClojurePsiImplUtil.getFirst(this);
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/testData/lexer/DispatchAndQuote.txt:
--------------------------------------------------------------------------------
1 | # ('#')
2 | { ('{')
3 | } ('}')
4 | WHITE_SPACE (' ')
5 | # ('#')
6 | string ('"\s*\d+"')
7 | WHITE_SPACE (' ')
8 | #' ('#'')
9 | sym ('x')
10 | WHITE_SPACE (' ')
11 | # ('#')
12 | ( ('(')
13 | WHITE_SPACE (' ')
14 | ) (')')
15 | WHITE_SPACE (' ')
16 | #_ ('#_')
17 | WHITE_SPACE ('\n')
18 | ' (''')
19 | sym ('quote')
20 | WHITE_SPACE (' ')
21 | ` ('`')
22 | sym ('qualify')
23 | WHITE_SPACE (' ')
24 | ~ ('~')
25 | sym ('unquote')
26 | WHITE_SPACE (' ')
27 | ~@ ('~@')
28 | sym ('unquote-splicing')
29 | WHITE_SPACE ('\n')
30 | #? ('#?')
31 | ( ('(')
32 | : (':')
33 | sym ('clj')
34 | WHITE_SPACE (' ')
35 | sym ('Double')
36 | / ('/')
37 | sym ('NaN')
38 | WHITE_SPACE (' ')
39 | : (':')
40 | sym ('cljs')
41 | WHITE_SPACE (' ')
42 | sym ('js')
43 | / ('/')
44 | sym ('NaN')
45 | WHITE_SPACE (' ')
46 | : (':')
47 | sym ('default')
48 | WHITE_SPACE (' ')
49 | nil ('nil')
50 | ) (')')
51 | WHITE_SPACE ('\n')
52 | #?@ ('#?@')
53 | ( ('(')
54 | : (':')
55 | sym ('clj')
56 | WHITE_SPACE (' ')
57 | [ ('[')
58 | number ('3')
59 | WHITE_SPACE (' ')
60 | number ('4')
61 | ] (']')
62 | WHITE_SPACE (' ')
63 | : (':')
64 | sym ('cljs')
65 | WHITE_SPACE (' ')
66 | [ ('[')
67 | number ('5')
68 | WHITE_SPACE (' ')
69 | number ('6')
70 | ] (']')
71 | ) (')')
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CMetadataImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CMetadataImpl extends CComposite implements CMetadata {
15 |
16 | public CMetadataImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitMetadata(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @Nullable
31 | public CForm getForm() {
32 | return PsiTreeUtil.getChildOfType(this, CForm.class);
33 | }
34 |
35 | @Override
36 | @NotNull
37 | public String toString() {
38 | return ClojurePsiImplUtil.toString(this);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CLiteralImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CLiteralImpl extends CSFormImpl implements CLiteral {
15 |
16 | public CLiteralImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitLiteral(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @Nullable
31 | public IElementType getLiteralType() {
32 | return ClojurePsiImplUtil.getLiteralType(this);
33 | }
34 |
35 | @Override
36 | @NotNull
37 | public String getLiteralText() {
38 | return ClojurePsiImplUtil.getLiteralText(this);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CReaderMacroImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CReaderMacroImpl extends CComposite implements CReaderMacro {
15 |
16 | public CReaderMacroImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitReaderMacro(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @Nullable
31 | public CSymbol getSymbol() {
32 | return PsiTreeUtil.getChildOfType(this, CSymbol.class);
33 | }
34 |
35 | @Override
36 | @NotNull
37 | public String toString() {
38 | return ClojurePsiImplUtil.toString(this);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CFormImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CFormImpl extends CComposite implements CForm {
15 |
16 | public CFormImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitForm(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @NotNull
31 | public List getMetas() {
32 | return PsiTreeUtil.getChildrenOfTypeAsList(this, CMetadata.class);
33 | }
34 |
35 | @Override
36 | @NotNull
37 | public List getReaderMacros() {
38 | return PsiTreeUtil.getChildrenOfTypeAsList(this, CReaderMacro.class);
39 | }
40 |
41 | @Override
42 | @NotNull
43 | public String toString() {
44 | return ClojurePsiImplUtil.toString(this);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/All_Tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/gen/org/intellij/clojure/psi/impl/CKeywordImpl.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package org.intellij.clojure.psi.impl;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.lang.ASTNode;
7 | import com.intellij.psi.PsiElement;
8 | import com.intellij.psi.PsiElementVisitor;
9 | import com.intellij.psi.util.PsiTreeUtil;
10 | import static org.intellij.clojure.psi.ClojureTypes.*;
11 | import org.intellij.clojure.psi.*;
12 | import com.intellij.psi.tree.IElementType;
13 |
14 | public class CKeywordImpl extends CKeywordBase implements CKeyword {
15 |
16 | public CKeywordImpl(@NotNull IElementType type) {
17 | super(type);
18 | }
19 |
20 | public void accept(@NotNull ClojureVisitor visitor) {
21 | visitor.visitKeyword(this);
22 | }
23 |
24 | public void accept(@NotNull PsiElementVisitor visitor) {
25 | if (visitor instanceof ClojureVisitor) accept((ClojureVisitor)visitor);
26 | else super.accept(visitor);
27 | }
28 |
29 | @Override
30 | @NotNull
31 | public CSymbol getSymbol() {
32 | return PsiTreeUtil.getChildOfType(this, CSymbol.class);
33 | }
34 |
35 | @Override
36 | @NotNull
37 | public String getName() {
38 | return ClojurePsiImplUtil.getName(this);
39 | }
40 |
41 | @Override
42 | @NotNull
43 | public String getNamespace() {
44 | return ClojurePsiImplUtil.getNamespace(this);
45 | }
46 |
47 | @Override
48 | public int getTextOffset() {
49 | return ClojurePsiImplUtil.getTextOffset(this);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/testData/parser/FirstAndSimple.txt:
--------------------------------------------------------------------------------
1 | CFileImpl:a.clj
2 | PsiComment(C_LINE_COMMENT)(';line')
3 | PsiWhiteSpace('\n')
4 | CListImpl(C_LIST)
5 | PsiElement(()('(')
6 | CSymbolImpl(C_SYMBOL)
7 | PsiElement(sym)('+')
8 | PsiWhiteSpace(' ')
9 | CLiteralImpl(C_LITERAL)
10 | PsiElement(number)('1')
11 | PsiWhiteSpace(' ')
12 | CLiteralImpl(C_LITERAL)
13 | PsiElement(number)('2')
14 | PsiWhiteSpace(' ')
15 | CLiteralImpl(C_LITERAL)
16 | PsiElement(number)('3')
17 | PsiElement())(')')
18 | PsiWhiteSpace('\n')
19 | CListImpl(C_LIST)
20 | PsiElement(()('(')
21 | CSymbolImpl(C_SYMBOL)
22 | CSymbolImpl(C_SYMBOL)
23 | PsiElement(sym)('clojure.core')
24 | PsiElement(/)('/')
25 | PsiElement(sym)('str')
26 | PsiWhiteSpace(' ')
27 | CLiteralImpl(C_LITERAL)
28 | PsiElement(string)('"a"')
29 | PsiWhiteSpace(' ')
30 | CSymbolImpl(C_SYMBOL)
31 | CReaderMacroImpl(C_READER_MACRO)
32 | PsiElement(')(''')
33 | PsiElement(sym)('..')
34 | PsiWhiteSpace(' ')
35 | CAccessImpl(C_ACCESS)
36 | CReaderMacroImpl(C_READER_MACRO)
37 | PsiElement(')(''')
38 | PsiElement(.-)('.-')
39 | CSymbolImpl(C_SYMBOL)
40 | PsiElement(sym)('a')
41 | PsiWhiteSpace(' ')
42 | CSymbolImpl(C_SYMBOL)
43 | PsiElement(sym)('val')
44 | PsiWhiteSpace(' ')
45 | CLiteralImpl(C_LITERAL)
46 | PsiElement(number)('123')
47 | PsiWhiteSpace(' ')
48 | CKeywordImpl(C_KEYWORD)
49 | PsiElement(:)(':')
50 | CSymbolImpl(C_SYMBOL)
51 | PsiElement(sym)('key')
52 | PsiElement())(')')
--------------------------------------------------------------------------------
/src/org/intellij/clojure/ui/forms/CodeStyleOtherTab.form:
--------------------------------------------------------------------------------
1 |
2 |
32 |
--------------------------------------------------------------------------------
/testData/parser/SimpleRecover.txt:
--------------------------------------------------------------------------------
1 | CFileImpl:a.clj
2 | PsiErrorElement: