1 |
dang 07/10/24 01:37:39 |
2 |
|
3 |
Added: gentoo.lang |
4 |
Log: |
5 |
Bump to 2.0.1-r1 |
6 |
- add gentoo language file; bug #194462 |
7 |
|
8 |
(Portage version: 2.1.3.16) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 x11-libs/gtksourceview/files/2.0/gentoo.lang |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/gtksourceview/files/2.0/gentoo.lang?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/gtksourceview/files/2.0/gentoo.lang?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: gentoo.lang |
17 |
=================================================================== |
18 |
<?xml version="1.0" encoding="UTF-8"?> |
19 |
|
20 |
<!-- |
21 |
GtkSourceView syntax highlight for Gentoo-specific files |
22 |
|
23 |
Originally written for gtksourceview-1.x by: |
24 |
Leonardo Ferreira Fontenelle <leo.fontenelle@×××××.com>, 2006. |
25 |
Rewritten for gtksourceview-2 by: |
26 |
Rene 'Necoro' Neumann <necoro@××××××.net>, 2007 |
27 |
|
28 |
Distributed under the same license(s) as gtksourceview. |
29 |
|
30 |
TODO: |
31 |
- do not highlight "enable" in the configure options |
32 |
- perhaps highlight portage variables and portage functions different |
33 |
|
34 |
--> |
35 |
|
36 |
<language name="gentoo" id="gentoo" version="2.0" _section="Scripts"> |
37 |
<metadata> |
38 |
<property name="mimetypes">text/plain</property> |
39 |
<property name="globs">*.ebuild;*.eclass</property> |
40 |
<property name="line-comment-start">#</property> |
41 |
</metadata> |
42 |
|
43 |
<styles> |
44 |
<style id="variable" _name="Portage variables" map-to="def:builtin" /> |
45 |
<style id="command" _name="Portage command" map-to="def:type" /> |
46 |
<style id="function" _name="Portage function" map-to="def:function" /> |
47 |
</styles> |
48 |
|
49 |
<definitions> |
50 |
|
51 |
<!-- rewrite shell string to show highlighted variables --> |
52 |
<context id="string" style-ref="def:string"> |
53 |
<start>"</start> |
54 |
<end>"</end> |
55 |
<include> |
56 |
<context ref="def:escape"/> |
57 |
<context ref="def:line-continue"/> |
58 |
<context ref="sh:variable1"/> |
59 |
</include> |
60 |
</context> |
61 |
|
62 |
<context id="string-2" style-ref="def:string"> |
63 |
<start>'</start> |
64 |
<end>'</end> |
65 |
<include> |
66 |
<context ref="def:escape"/> |
67 |
<context ref="def:line-continue"/> |
68 |
<context ref="sh:variable1"/> |
69 |
</include> |
70 |
</context> |
71 |
|
72 |
<!-- subprograms: |
73 |
- $(..) is not supported currently in the normal sh.lang |
74 |
- `...` is interpreted as string - I think the subshell behavior is more acurate --> |
75 |
<context id="subprogram"> |
76 |
<start>\$\(</start> |
77 |
<end>\)</end> |
78 |
<include> |
79 |
<context sub-pattern="0" where="start" style-ref="sh:keyword"/> |
80 |
<context sub-pattern="0" where="end" style-ref="sh:keyword"/> |
81 |
<context ref="gentoo"/> |
82 |
</include> |
83 |
</context> |
84 |
|
85 |
<context id="subprogram-2"> |
86 |
<start>`</start> |
87 |
<end>`</end> |
88 |
<include> |
89 |
<context sub-pattern="0" where="start" style-ref="sh:keyword"/> |
90 |
<context sub-pattern="0" where="end" style-ref="sh:keyword"/> |
91 |
<context ref="gentoo"/> |
92 |
</include> |
93 |
</context> |
94 |
|
95 |
<!-- portage variables - currently unused --> |
96 |
<context id="portvars" style-ref="variable"> |
97 |
<match>\b((ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)|(S|D|T|PV|PF|P|PN|A)|C(XX)?FLAGS|LDFLAGS|C(HOST|TARGET|BUILD))\b</match> |
98 |
</context> |
99 |
|
100 |
<!-- portage functions - currently unused --> |
101 |
<context id="portfuncs" style-ref="function"> |
102 |
<match>^(src_(unpack|compile|install|test)|pkg_(config|nofetch|setup|(pre|post)(inst|rm)))</match> |
103 |
</context> |
104 |
|
105 |
<!-- extra portage commands --> |
106 |
<context id="portcmds" style-ref="command"> |
107 |
<match>\b(e(begin|end|conf|install|make|warn|infon?|error|patch)|die|use(_(with|enable))?|inherit|has|(has|best)_version|unpack|(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)|do(python|sed|dir|hard|sym|html|jar|mo)|keepdir|prepall(|docs|info|man|strip)|prep(info|lib|lib\.(so|a)|man|strip)|(|doc|ins|exe)into|f(owners|perms)|(exe|ins|dir)opts)\b</match> |
108 |
</context> |
109 |
|
110 |
<context id="built-in-command"> |
111 |
<include> <!-- do not include "sh:built-in-command" as it is replaced down there - which would lead to an endless loop --> |
112 |
<context ref="sh:built-in-command-1" /> |
113 |
<context ref="sh:built-in-command-2" /> |
114 |
<context ref="portcmds" /> |
115 |
</include> |
116 |
</context> |
117 |
|
118 |
<!-- gentoo is just a shell with the replacements --> |
119 |
<replace id="sh:string" ref="string" /> |
120 |
<replace id="sh:string-2" ref="string-2" /> |
121 |
<replace id="sh:built-in-command" ref="built-in-command" /> |
122 |
<replace id="sh:backtick-string" ref="subprogram-2" /> |
123 |
<context id="gentoo"> |
124 |
<include> |
125 |
<context ref="subprogram"/> |
126 |
<context ref="sh:sh"/> |
127 |
</include> |
128 |
</context> |
129 |
</definitions> |
130 |
</language> |
131 |
|
132 |
|
133 |
|
134 |
-- |
135 |
gentoo-commits@g.o mailing list |