Skip to content

Instantly share code, notes, and snippets.

@jdp
Created January 2, 2009 09:22
Show Gist options
  • Save jdp/42494 to your computer and use it in GitHub Desktop.
Save jdp/42494 to your computer and use it in GitHub Desktop.
gedit language file for io
<?xml version="1.0" encoding="UTF-8"?>
<language id="io" _name="Io" version="2.0" _section="Scripts">
<metadata>
<property name="mimetypes">application/x-io;text/x-io</property>
<property name="globs">*.io</property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="multiline-string" _name="Multiline String" map-to="def:string"/>
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
</styles>
<definitions>
<context id="io-escape" style-ref="escape">
<match>\\(\d\d?\d?|.)</match>
</context>
<context id="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true">
<start>//|#</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>\%{0@start}</end>
<include>
<context ref="io-escape"/>
</include>
</context>
<context id="multi-line-string" style-ref="multiline-string">
<start>"""</start>
<end>\%{0@start}</end>
<include>
<context ref="io-escape"/>
</include>
</context>
<context id="io">
<include>
<context ref="def:shebang"/>
<context ref="block-comment"/>
<context ref="line-comment"/>
<context ref="string"/>
<context ref="multi-line-string"/>
</include>
</context>
</definitions>
</language>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment