Lines 6-12
Link Here
|
6 |
Originally written for gtksourceview-1.x by: |
6 |
Originally written for gtksourceview-1.x by: |
7 |
Leonardo Ferreira Fontenelle <leo.fontenelle@gmail.com>, 2006. |
7 |
Leonardo Ferreira Fontenelle <leo.fontenelle@gmail.com>, 2006. |
8 |
Rewritten for gtksourceview-2 by: |
8 |
Rewritten for gtksourceview-2 by: |
9 |
Rene 'Necoro' Neumann <necoro@necoro.net>, 2007 |
9 |
Rene 'Necoro' Neumann <necoro@necoro.net>, 2007-2008 |
10 |
|
10 |
|
11 |
Distributed under the same license(s) as gtksourceview. |
11 |
Distributed under the same license(s) as gtksourceview. |
12 |
|
12 |
|
Lines 32-81
Link Here
|
32 |
|
32 |
|
33 |
<definitions> |
33 |
<definitions> |
34 |
|
34 |
|
35 |
<!-- rewrite shell string to show highlighted variables --> |
|
|
36 |
<context id="string" style-ref="def:string"> |
37 |
<start>"</start> |
38 |
<end>"</end> |
39 |
<include> |
40 |
<context ref="def:escape"/> |
41 |
<context ref="def:line-continue"/> |
42 |
<context ref="sh:variable"/> |
43 |
</include> |
44 |
</context> |
45 |
|
46 |
<context id="string-2" style-ref="def:string"> |
47 |
<start>'</start> |
48 |
<end>'</end> |
49 |
<include> |
50 |
<context ref="def:escape"/> |
51 |
<context ref="def:line-continue"/> |
52 |
<context ref="sh:variable"/> |
53 |
</include> |
54 |
</context> |
55 |
|
56 |
<!-- subprograms: |
57 |
- $(..) is not supported currently in the normal sh.lang |
58 |
- `...` is interpreted as string - I think the subshell behavior is more acurate --> |
59 |
<context id="subprogram"> |
60 |
<start>\$\(</start> |
61 |
<end>\)</end> |
62 |
<include> |
63 |
<context sub-pattern="0" where="start" style-ref="sh:keyword"/> |
64 |
<context sub-pattern="0" where="end" style-ref="sh:keyword"/> |
65 |
<context ref="gentoo"/> |
66 |
</include> |
67 |
</context> |
68 |
|
69 |
<context id="subprogram-2"> |
70 |
<start>`</start> |
71 |
<end>`</end> |
72 |
<include> |
73 |
<context sub-pattern="0" where="start" style-ref="sh:keyword"/> |
74 |
<context sub-pattern="0" where="end" style-ref="sh:keyword"/> |
75 |
<context ref="gentoo"/> |
76 |
</include> |
77 |
</context> |
78 |
|
79 |
<!-- portage variables - currently unused --> |
35 |
<!-- portage variables - currently unused --> |
80 |
<context id="portvars" style-ref="variable"> |
36 |
<context id="portvars" style-ref="variable"> |
81 |
<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> |
37 |
<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> |
Lines 88-111
Link Here
|
88 |
|
44 |
|
89 |
<!-- extra portage commands --> |
45 |
<!-- extra portage commands --> |
90 |
<context id="portcmds" style-ref="command"> |
46 |
<context id="portcmds" style-ref="command"> |
91 |
<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> |
47 |
<match>\b(e(begin|end|conf|install|make|log|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> |
92 |
</context> |
48 |
</context> |
93 |
|
49 |
|
94 |
<context id="built-in-command"> |
50 |
<context id="built-in-command"> |
95 |
<include> <!-- do not include "sh:built-in-command" as it is replaced down there - which would lead to an endless loop --> |
51 |
<include> <!-- do not include "sh:built-in-command" as it is replaced down there - which would lead to an endless loop --> |
96 |
<context ref="sh:built-in-command-1" /> |
52 |
<context ref="sh:built-in-command-1" /> |
97 |
<context ref="sh:built-in-command-2" /> |
53 |
<context ref="sh:built-in-command-2" /> |
|
|
54 |
<context ref="sh:for-command" /> |
98 |
<context ref="portcmds" /> |
55 |
<context ref="portcmds" /> |
99 |
</include> |
56 |
</include> |
100 |
</context> |
57 |
</context> |
101 |
|
58 |
|
102 |
<!-- gentoo is just a shell with the replacements --> |
59 |
<!-- gentoo is just a shell with the replacements --> |
103 |
<replace id="sh:built-in-command" ref="built-in-command" /> |
60 |
<replace id="sh:built-in-command" ref="built-in-command" /> |
104 |
<replace id="sh:backtick-subshell" ref="subprogram-2" /> |
61 |
|
105 |
<context id="gentoo"> |
62 |
<context id="gentoo"> |
106 |
<include> |
63 |
<include> |
107 |
<context ref="subprogram"/> |
64 |
<context ref="sh:sh" /> |
108 |
<context ref="sh:sh"/> |
|
|
109 |
</include> |
65 |
</include> |
110 |
</context> |
66 |
</context> |
111 |
</definitions> |
67 |
</definitions> |