Added MooScript language

master
Yevgen Muntyan 2006-02-26 19:41:52 -06:00
parent e3bc0cff16
commit ca00c469bc
4 changed files with 70 additions and 2 deletions

View File

@ -11,6 +11,7 @@ mooedit_syntax_DATA = \
$(mooedit_syntax)/gap.lang \
$(mooedit_syntax)/make.lang \
$(mooedit_syntax)/misc.lang \
$(mooedit_syntax)/ms.lang \
$(mooedit_syntax)/python.lang \
$(mooedit_syntax)/python-console.lang \
$(mooedit_syntax)/scheme.lang \

View File

@ -1,6 +1,6 @@
#!/bin/sh
langs="c.lang diff.lang misc.lang make.lang python.lang python-console.lang sh.lang xml.lang sci.lang gap.lang scheme.lang"
langs="c.lang diff.lang misc.lang make.lang ms.lang python.lang python-console.lang sh.lang xml.lang sci.lang gap.lang scheme.lang"
styles="garnacho.styles gvim.styles"
files="$langs $styles"

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?><!-- kate: space-indent on; indent-width 2; strip on; -->
<!DOCTYPE language SYSTEM "language.dtd">
<language name="MooScript" version="1.0" section="Scripts"
mimetypes="text/x-mooscript;application/x-mooscript"
extensions="*.ms">
<syntax>
<context name="Normal">
<Char char="&quot;" context="String" style="String"/>
<Char char="&apos;" context="String" style="String"/>
<Char char="#" context="Comment" style="Comment"/>
<Keyword keyword="Keyword" style="Keyword"/>
<Keyword keyword="SpecialVars" style="SpecialVars"/>
<Regex pattern="\b[_\w][_\w\d]*(?=[\s]*[(])" style="Function"/>
</context>
<context name="String" style="String" eol-context="#pop">
<Char char="&quot;" context="#pop" style="String"/>
</context>
<context name="Comment" style="Comment" eol-context="#pop">
<IncludeRules from="##Misc##AlertRules"/>
</context>
<keyword-list name="Keyword">
<keyword>and</keyword>
<keyword>do</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>fi</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>not</keyword>
<keyword>od</keyword>
<keyword>or</keyword>
<keyword>then</keyword>
<keyword>while</keyword>
</keyword-list>
<keyword-list name="SpecialVars">
<keyword>false</keyword>
<keyword>none</keyword>
<keyword>true</keyword>
</keyword-list>
</syntax>
<styles>
<style name="String" default-style="String"/>
<style name="Comment" default-style="Comment"/>
<style name="Keyword" default-style="Keyword"/>
<style name="SpecialVars" default-style="Others" bold="TRUE"/>
<style name="Function" default-style="Function"/>
</styles>
<general>
<comments>
<single-line start="#"/>
</comments>
</general>
<sample-code>## This is a comment
## TODO: do something
for i in [1..100] do
Print("Hello world!");
od;
</sample-code>
</language>

View File

@ -139,9 +139,9 @@
</styles>
<general>
<brackets>(){}[]&lt;&gt;</brackets>
<comments>
<multi-line start="&lt;!--" end="--&gt;"/>
</comments>
<brackets>(){}[]&lt;&gt;</brackets>
</general>
</language>