File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # The syntax highlight for V
2
+
3
+ # Author : HARXI
4
+ # Version: 1.0.0
5
+ # License: MIT
6
+
7
+ syntax v " \. (v| c. v| . vsh| . vv)$ "
8
+
9
+ # Operators
10
+ color brightred " (\+ | -| \* | /| %| ~| &| (\| )| ^ | !| <| >| :=| =| \? | \. )"
11
+
12
+ # Keywords
13
+ color bold ,pink " \< (as| asm| assert| atomic| break| const| continue| defer| else| enum| false| fn| for| go| goto| if| import| in| interface| is| isreftype| lock| match| module| mut| none| or| pub| return| rlock| select| shared| sizeof| spawn| static| struct| true| type| typeof| union| unsafe| volatile| __global| __offsetof)\> "
14
+
15
+ # Literals
16
+ color rosy " \< ([0 -9 ]+ | 0[oO ][0 -7 ]+ | 0[xX ][[:xdigit :] ]+ )\> "
17
+ color rosy " \< [0 -9 ]+ \. [0 -9 ]* ([eE ][+ - ]? [0 -9 ]+ )? \> "
18
+ color rosy " \< [0 -9 ]+ [eE ][+ - ]? [0 -9 ]+ \> "
19
+ color rosy " \< [0 -9 ]+ \> "
20
+
21
+ # Types
22
+ color bold ,pink " \< (bool| string| int| i(8| 16| 32| 64| 128)| u(8| 16| 32| 64| 128)| rune| f(32| 64)| isize| usize| voidptr| any)\> "
23
+
24
+ # Compile time
25
+ color brightblue " \$ ([a -zA -Z . _0 -9 ])+ "
26
+
27
+ # Flags
28
+ color brightblue " \# ([a -zA -Z . _0 -9 ])+ "
29
+
30
+ # Upper case words
31
+ color rosy " [A -Z ][A -Za -z0 -9_ ]+ "
32
+
33
+ # Compile time constants
34
+ color pink " \@ ([a -zA -Z . _0 -9 ])+ "
35
+
36
+ # String and char
37
+ color brightyellow " "([^ " \] | \\ . )* " | ' ([^' \] | \\ . )* '"
38
+ color brightgreen "` ([^` \] | \\ . )* `"
39
+
40
+ # Comments
41
+ color brightblue start="/ \* " end=" \* /"
42
+ color brightblue " (^| [[:blank :] ])//. * "
You can’t perform that action at this time.
0 commit comments