forked from richrad/nanorc-mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
java.nanorc
25 lines (22 loc) · 795 Bytes
/
java.nanorc
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
syntax "java" "\.java$"
# Class
SECTION: "class +[A-Za-z0-9]+ *((implements|extends) +[A-Za-z0-9.]+)?"
# Annotation
ESCAPE: "@[A-Za-z]+"
+FUNCTION
TYPE: "\<(boolean|byte|char|double|float|int|long|short|String|void)\>"
KEYWORD: "\<(case|catch|default|do|else|finally|for|if)\>"
KEYWORD: "\<(new|return|switch|this|throw|transient|try|while)\>"
KEYWORD: "\<(abstract|class|extends|final|implements|import|instanceof)\>"
KEYWORD: "\<(interface|native|package|private|protected|public|static)\>"
KEYWORD: "\<(strictfp|super|synchronized|throws|volatile|null)\>"
JUMP: "\<(break|continue)\>"
+BOOLEAN
OPERATOR: "[-+/*=<>?:!~%&|]"
NUMBER: "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
+STRING
ESCAPE: "\\([btnfr]|'|\"|\\)"
ESCAPE: "\\u[A-Fa-f0-9]{4}"
+CCOMMENT
+TODO
+LINT