Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit e9a1456

Browse files
Support for CSS
1 parent 9ceba39 commit e9a1456

File tree

10 files changed

+1843
-0
lines changed

10 files changed

+1843
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ dependencies {
538538
implementation 'com.blacksquircle.ui:language-c:2.6.0'
539539
implementation 'com.blacksquircle.ui:language-cpp:2.6.0'
540540
implementation 'com.blacksquircle.ui:language-csharp:2.6.0'
541+
implementation 'com.blacksquircle.ui:language-css:2.6.0'
541542
implementation 'com.blacksquircle.ui:language-groovy:2.6.0'
542543
implementation 'com.blacksquircle.ui:language-html:2.6.0'
543544
implementation 'com.blacksquircle.ui:language-java:2.6.0'

language-css/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

language-css/build.gradle

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2023 Squircle CE contributors.
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+
plugins {
18+
id 'java-library'
19+
id 'kotlin'
20+
}
21+
22+
ext.libraryGroupId = "com.blacksquircle.ui"
23+
ext.libraryArtifactId = "language-css"
24+
25+
apply from: rootProject.file("gradle/publish.gradle")
26+
27+
group libraryGroupId
28+
version versions.publishVersionName
29+
30+
java {
31+
sourceCompatibility = JavaVersion.VERSION_17
32+
targetCompatibility = JavaVersion.VERSION_17
33+
}
34+
35+
sourceSets {
36+
main.java.srcDirs += 'src/main/kotlin'
37+
}
38+
39+
dependencies {
40+
41+
// Core
42+
implementation library.kotlin
43+
44+
// Modules
45+
api project(':editorkit:language-base')
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2023 Squircle CE contributors.
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+
package com.blacksquircle.ui.language.css
18+
19+
import com.blacksquircle.ui.language.base.Language
20+
import com.blacksquircle.ui.language.base.parser.LanguageParser
21+
import com.blacksquircle.ui.language.base.provider.SuggestionProvider
22+
import com.blacksquircle.ui.language.base.styler.LanguageStyler
23+
import com.blacksquircle.ui.language.css.parser.CssParser
24+
import com.blacksquircle.ui.language.css.provider.CssProvider
25+
import com.blacksquircle.ui.language.css.styler.CssStyler
26+
27+
class CssLanguage : Language {
28+
29+
companion object {
30+
const val LANGUAGE_NAME = "css"
31+
}
32+
33+
override val languageName = LANGUAGE_NAME
34+
35+
override fun getParser(): LanguageParser {
36+
return CssParser.getInstance()
37+
}
38+
39+
override fun getProvider(): SuggestionProvider {
40+
return CssProvider.getInstance()
41+
}
42+
43+
override fun getStyler(): LanguageStyler {
44+
return CssStyler.getInstance()
45+
}
46+
}

0 commit comments

Comments
 (0)