Removed automake.lang, added some stuff in def.lang

master
Yevgen Muntyan 2006-08-29 00:08:18 -05:00
parent 37f67cc758
commit 49ac2ab247
6 changed files with 37 additions and 22 deletions

View File

@ -12,7 +12,6 @@ langs2 = \
langs1 = \
ada.lang \
automake.lang \
changelog.lang \
check.sh \
csharp.lang \

View File

@ -20,12 +20,10 @@
<include>
<!-- Comments -->
<context id="comment" style-ref="comment">
<context id="comment" style-ref="comment" end-at-line-end="true">
<start>\/\/</start>
<end>$</end>
<include>
<context ref="def:line-continue"/>
<context ref="def:comment:*"/>
<context ref="def:line-comment"/>
</include>
</context>

View File

@ -3,7 +3,7 @@
# "./check.sh" without arguments will validate lang and styles files
# specified here.
langs="automake.lang c.lang cpp.lang changelog.lang def.lang \
langs="c.lang cpp.lang changelog.lang def.lang \
html.lang javascript.lang latex.lang makefile.lang \
xml.lang yacc.lang"

View File

@ -107,6 +107,23 @@
<end>^</end>
</context>
<!-- this is intended to be used from line comments starting not with #,
see shell-like-comment below -->
<context id="line-comment">
<include>
<context ref="line-continue" ignore-style="true"/>
<context ref="comment:*"/>
</include>
</context>
<!-- A line comment starting with #, with \ as escape-new-line char -->
<context id="shell-like-comment" style-ref="comment" end-at-line-end="true">
<start>#</start>
<include>
<context ref="line-comment"/>
</include>
</context>
<context id="shebang" style-ref="shebang" first-line-only="true">
<start>^#!</start>
<end>$</end>

View File

@ -43,4 +43,6 @@
<style name="latex:command" foreground="#008000"/>
<style name="changelog:release" foreground="#0095ff" bold="true"/>
<style name="makefile:trailing-tab" background="pink"/>
</style-scheme>

View File

@ -2,12 +2,13 @@
<language id="makefile" _name="Makefile" version="2.0" _section="Sources"
mimetypes="text/x-makefile" globs="Makefile*">
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="def:data-type"/>
<style id="target" name="Target" map-to="def:function"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="def:data-type"/>
<style id="target" name="Target" map-to="def:function"/>
<style id="trailing-tab" name="Trailing Tab"/>
</styles>
<definitions>
@ -23,15 +24,7 @@
<context id="makefile">
<include>
<context ref="def:shebang"/>
<context id="line-comment" style-ref="comment" end-at-line-end="true">
<start>#</start>
<include>
<context ref="def:line-continue"/>
<context ref="def:comment:*"/>
</include>
</context>
<context ref="def:shell-like-comment"/>
<context ref="def:string"/>
<context ref="def:single-quoted-string"/>
@ -54,21 +47,27 @@
</context>
<context id="targets">
<match>^\s*([^\s]+)\s*\:</match>
<match>^([^\t\:][^\:]*)\:</match>
<include>
<context sub-pattern="1" style-ref="target"/>
</include>
</context>
<context id="trailing-tab" style-ref="trailing-tab">
<match>^\t+$</match>
</context>
<context id="directives" style-ref="keyword">
<keyword>define</keyword>
<keyword>else</keyword>
<keyword>endef</keyword>
<keyword>endif</keyword>
<keyword>if</keyword>
<keyword>ifdef</keyword>
<keyword>ifeq</keyword>
<keyword>ifndef</keyword>
<keyword>ifneq</keyword>
<keyword>include</keyword>
<keyword>override</keyword>
<keyword>unexport</keyword>
</context>