Skip to content

Commit 2ab3ae2

Browse files
committed
[ yacctt ] Some missing stuffs
1 parent a1fa435 commit 2ab3ae2

File tree

4 files changed

+75
-7
lines changed

4 files changed

+75
-7
lines changed

res/org/ice1000/tt/css/YaccTT.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/* Token types. */
2+
.YaccTT .YACC_TT_KEYWORD {
3+
color: #000080;
4+
font-weight: bold;
5+
}
6+
7+
.YaccTT .YACC_TT_IDENTIFIER {
8+
color: #000000;
9+
}
10+
11+
.YaccTT .YACC_TT_SEMICOLON {
12+
}
13+
14+
.YaccTT .YACC_TT_FUNCTION_NAME {
15+
}
16+
17+
.YaccTT .YACC_TT_DATATYPE_NAME {
18+
}
19+
20+
.YaccTT .YACC_TT_COMMA {
21+
}
22+
23+
.YaccTT .YACC_TT_PAREN {
24+
}
25+
26+
.YaccTT .YACC_TT_BRACK {
27+
}
28+
29+
.YaccTT .YACC_TT_UNDEFINED {
30+
color: #000080;
31+
font-weight: bold;
32+
}
33+
34+
.YaccTT .YACC_TT_HOLE {
35+
}
36+
37+
.YaccTT .YACC_TT_DIMENSION {
38+
color: #0000FF;
39+
}
40+
41+
.YaccTT .YACC_TT_PROJECTION {
42+
}
43+
44+
.YaccTT .YACC_TT_LINE_COMMENT {
45+
color: #808080;
46+
font-style: italic;
47+
}
48+
49+
.YaccTT .YACC_TT_BLOCK_COMMENT {
50+
color: #808080;
51+
font-style: italic;
52+
}
53+
54+
/* Standard attributes. */
55+
.YaccTT a {
56+
text-decoration: none;
57+
}
58+
59+
.YaccTT :target {
60+
border: 2px solid #ECFAEB;
61+
background-color: #ECFAEB;
62+
}
63+
64+
.YaccTT a[href]:hover {
65+
color: #0000FF;
66+
text-decoration: underline;
67+
text-decoration-color: #0000FF;
68+
}

src/org/ice1000/tt/editing/yacctt/completion.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import org.ice1000.tt.psi.yacctt.YaccTTImportMixin
1414
import org.ice1000.tt.psi.yacctt.YaccTTModuleMixin
1515

1616
class YaccTTCompletionContributor : CompletionContributor(), DumbAware {
17-
private val keywords = makeKeywordsCompletion(TTIcons.CUBICAL_TT, listOf(
17+
private val keywords = makeKeywordsCompletion(TTIcons.YACC_TT, listOf(
1818
"transparentAll", "transparent", "undefined", "import", "module",
1919
"mutual", "opaque", "split@", "hdata", "PathP", "LineP", "split", "Vproj",
2020
"where", "data", "with", "hcom", "Vin", "let", "coe", "com", "box", "cap", "in"

src/org/ice1000/tt/psi/yacctt/mixins.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class YaccTTModuleMixin : StubBasedPsiElementBase<YaccTTModuleStub>, Ya
2828

2929
override fun getPresentation() = object : ItemPresentation {
3030
override fun getLocationString() = containingFile.name
31-
override fun getIcon(dark: Boolean) = TTIcons.CUBICAL_TT_FILE
31+
override fun getIcon(dark: Boolean) = TTIcons.YACC_TT_FILE
3232
override fun getPresentableText() = name
3333
}
3434

@@ -71,7 +71,7 @@ abstract class YaccTTLabelMixin : StubBasedPsiElementBase<YaccTTLabelStub>, Yacc
7171

7272
override fun getPresentation() = object : ItemPresentation {
7373
override fun getLocationString() = containingFile.name
74-
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.CUBICAL_TT_FILE
74+
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.YACC_TT_FILE
7575
override fun getPresentableText() = name
7676
}
7777

@@ -100,7 +100,7 @@ abstract class YaccTTDefMixin : StubBasedPsiElementBase<YaccTTDefStub>, YaccTTDe
100100

101101
override fun getPresentation() = object : ItemPresentation {
102102
override fun getLocationString() = containingFile.name
103-
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.CUBICAL_TT_FILE
103+
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.YACC_TT_FILE
104104
override fun getPresentableText() = name
105105
}
106106

@@ -124,7 +124,7 @@ abstract class YaccTTDataMixin : StubBasedPsiElementBase<YaccTTDataStub>, YaccTT
124124
override fun getName() = nameIdentifier?.text
125125
override fun getPresentation() = object : ItemPresentation {
126126
override fun getLocationString() = containingFile.name
127-
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.CUBICAL_TT_FILE
127+
override fun getIcon(dark: Boolean) = nameIdentifier?.getIcon(0) ?: TTIcons.YACC_TT_FILE
128128
override fun getPresentableText() = name
129129
}
130130

src/org/ice1000/tt/psi/yacctt/semantics.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class YaccTTModuleUsageMixin(node: ASTNode) : GeneralReference(node), Y
3535
override fun getVariants() = modules(this)
3636
.mapNotNull { it.stub?.moduleName ?: it.nameDecl?.text }
3737
.map(LookupElementBuilder::create)
38-
.map { it.withIcon(TTIcons.CUBICAL_TT_FILE) }
38+
.map { it.withIcon(TTIcons.YACC_TT_FILE) }
3939
.toList()
4040
.toTypedArray()
4141

@@ -87,7 +87,7 @@ abstract class YaccTTNameMixin(node: ASTNode) : GeneralReference(node), YaccTTNa
8787
LookupElementBuilder
8888
.create(it.text)
8989
.withTypeText((it as? YaccTTNameDeclMixin)?.kind?.name ?: "")
90-
.withIcon(it.getIcon(0) ?: TTIcons.CUBICAL_TT)
90+
.withIcon(it.getIcon(0) ?: TTIcons.YACC_TT)
9191
}), this)
9292

9393
private companion object ResolverHolder {

0 commit comments

Comments
 (0)