PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.1.0
Code Block Pro – Beautiful Syntax Highlighting v1.1.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / berry.tmLanguage.json

berry.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.1.0, at build/shiki/languages/berry.tmLanguage.json

124 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3 "name": "berry",
4 "patterns": [
5 {
6 "include": "#controls"
7 },
8 {
9 "include": "#strings"
10 },
11 {
12 "include": "#comment-block"
13 },
14 {
15 "include": "#comments"
16 },
17 {
18 "include": "#keywords"
19 },
20 {
21 "include": "#function"
22 },
23 {
24 "include": "#member"
25 },
26 {
27 "include": "#identifier"
28 },
29 {
30 "include": "#number"
31 },
32 {
33 "include": "#operator"
34 }
35 ],
36 "repository": {
37 "controls": {
38 "patterns": [
39 {
40 "name": "keyword.control.berry",
41 "match": "\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\b"
42 }
43 ]
44 },
45 "strings": {
46 "patterns": [
47 {
48 "name": "string.quoted.double.berry",
49 "match": "\"(\\\\.|[^\"])*\""
50 },
51 {
52 "name": "string.quoted.single.berry",
53 "match": "'(\\\\.|[^'])*'"
54 }
55 ]
56 },
57 "comment-block": {
58 "name": "comment.berry",
59 "begin": "\\#\\-",
60 "end": "\\-#",
61 "patterns": [{}]
62 },
63 "comments": {
64 "name": "comment.line.berry",
65 "begin": "\\#",
66 "end": "\\n",
67 "patterns": [{}]
68 },
69 "keywords": {
70 "patterns": [
71 {
72 "name": "keyword.berry",
73 "match": "\\b(var|static|def|class|true|false|nil|self|super|import|as)\\b"
74 }
75 ]
76 },
77 "identifier": {
78 "patterns": [
79 {
80 "name": "identifier.berry",
81 "match": "\\b[_A-Za-z]\\w+\\b"
82 }
83 ]
84 },
85 "number": {
86 "patterns": [
87 {
88 "name": "constant.numeric.berry",
89 "match": "0x[a-fA-F0-9]+|\\d+|(\\d+\\.?|\\.\\d)\\d*([eE][+-]?\\d+)?"
90 }
91 ]
92 },
93 "operator": {
94 "patterns": [
95 {
96 "name": "keyword.operator.berry",
97 "match": "\\(|\\)|\\[|\\]|\\.|-|\\!|~|\\*|/|%|\\+|&|\\^|\\||<|>|=|:"
98 }
99 ]
100 },
101 "member": {
102 "patterns": [
103 {
104 "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)",
105 "captures": {
106 "0": {
107 "name": "entity.other.attribute-name.berry"
108 }
109 }
110 }
111 ]
112 },
113 "function": {
114 "patterns": [
115 {
116 "name": "entity.name.function.berry",
117 "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\())"
118 }
119 ]
120 }
121 },
122 "scopeName": "source.berry"
123 }
124