Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit 798e9cd

Browse files
committed
Move highlighting information into @lezer/java
1 parent acb7833 commit 798e9cd

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"sideEffects": false,
2727
"license": "MIT",
2828
"dependencies": {
29-
"@codemirror/highlight": "^0.19.7",
3029
"@codemirror/language": "^0.19.0",
3130
"@lezer/java": "^0.15.0"
3231
},

src/java.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {parser} from "@lezer/java"
22
import {flatIndent, continuedIndent, indentNodeProp, foldNodeProp, foldInside,
33
LRLanguage, LanguageSupport} from "@codemirror/language"
4-
import {styleTags, tags as t} from "@codemirror/highlight"
54

65
/// A language provider based on the [Lezer Java
76
/// parser](https://github.com/lezer-parser/java), extended with
@@ -24,42 +23,6 @@ export const javaLanguage = LRLanguage.define({
2423
["Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody " +
2524
"ConstructorBody InterfaceBody ArrayInitializer"]: foldInside,
2625
BlockComment(tree) { return {from: tree.from + 2, to: tree.to - 2} }
27-
}),
28-
styleTags({
29-
null: t.null,
30-
instanceof: t.operatorKeyword,
31-
this: t.self,
32-
"new super assert open to with void": t.keyword,
33-
"class interface extends implements enum": t.definitionKeyword,
34-
"module package import": t.moduleKeyword,
35-
"switch while for if else case default do break continue return try catch finally throw": t.controlKeyword,
36-
["requires exports opens uses provides public private protected static transitive abstract final " +
37-
"strictfp synchronized native transient volatile throws"]: t.modifier,
38-
IntegerLiteral: t.integer,
39-
FloatLiteral: t.float,
40-
"StringLiteral TextBlock": t.string,
41-
CharacterLiteral: t.character,
42-
LineComment: t.lineComment,
43-
BlockComment: t.blockComment,
44-
BooleanLiteral: t.bool,
45-
PrimitiveType: t.standard(t.typeName),
46-
TypeName: t.typeName,
47-
Identifier: t.variableName,
48-
"MethodName/Identifier": t.function(t.variableName),
49-
Definition: t.definition(t.variableName),
50-
ArithOp: t.arithmeticOperator,
51-
LogicOp: t.logicOperator,
52-
BitOp: t.bitwiseOperator,
53-
CompareOp: t.compareOperator,
54-
AssignOp: t.definitionOperator,
55-
UpdateOp: t.updateOperator,
56-
Asterisk: t.punctuation,
57-
Label: t.labelName,
58-
"( )": t.paren,
59-
"[ ]": t.squareBracket,
60-
"{ }": t.brace,
61-
".": t.derefOperator,
62-
", ;": t.separator
6326
})
6427
]
6528
}),

0 commit comments

Comments
 (0)