[gtksourceview] Add objective-j lang
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Add objective-j lang
- Date: Mon, 25 Apr 2011 19:49:54 +0000 (UTC)
commit 88592923484b02c12879e026d569253a28080657
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Apr 25 21:45:13 2011 +0200
Add objective-j lang
https://bugzilla.gnome.org/show_bug.cgi?id=637504 patch from Patryk
Zawadzki.
data/language-specs/Makefile.am | 1 +
data/language-specs/objj.lang | 128 +++++++++++++++++++++++++++++++++++++++
po/POTFILES.in | 1 +
3 files changed, 130 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/Makefile.am b/data/language-specs/Makefile.am
index cdd0089..e4e5c75 100644
--- a/data/language-specs/Makefile.am
+++ b/data/language-specs/Makefile.am
@@ -56,6 +56,7 @@ LANGUAGES = \
nemerle.lang \
nsis.lang \
objc.lang \
+ objj.lang \
ocaml.lang \
ocl.lang \
octave.lang \
diff --git a/data/language-specs/objj.lang b/data/language-specs/objj.lang
new file mode 100644
index 0000000..c7741e9
--- /dev/null
+++ b/data/language-specs/objj.lang
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This file is part of GtkSourceView
+
+ Author: Yevgen Muntyan <muntyan math tamu edu>
+ Author: Patryk Zawadzki <patrys pld-linux org>
+ Copyright (C) 2007 Yevgen Muntyan <muntyan math tamu edu>
+ Copyright (C) 2010 Patryk Zawadzki <patrys pld-linux org>
+
+ GtkSourceView is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ GtkSourceView is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+-->
+<language id="objj" name="Objective-J" version="2.0" _section="Sources">
+ <metadata>
+ <property name="mimetypes">text/x-objective-j</property>
+ <property name="globs">*.j</property>
+ <property name="line-comment-start">//</property>
+ <property name="block-comment-start">/*</property>
+ <property name="block-comment-end">*/</property>
+ </metadata>
+
+ <styles>
+ <style id="boolean" _name="Boolean" map-to="js:boolean"/>
+ <style id="keyword" _name="Keyword" map-to="js:keyword"/>
+ <style id="type" _name="Data Type" map-to="js:type"/>
+ <style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
+ <style id="included-file" _name="Included File" map-to="js:string"/>
+ <style id="string" _name="String" map-to="js:string"/>
+ <style id="null-value" _name="Null Value" map-to="js:null-value"/>
+ </styles>
+
+ <definitions>
+ <!-- Objective-J-specific stuff (i.e. stuff which is not JS) -->
+ <context id="headers">
+ <include>
+ <context style-ref="keyword">
+ <prefix>\@</prefix>
+ <keyword>catch</keyword>
+ <keyword>class</keyword>
+ <keyword>defs</keyword>
+ <keyword>encode</keyword>
+ <keyword>end</keyword>
+ <keyword>finally</keyword>
+ <keyword>implementation</keyword>
+ <keyword>interface</keyword>
+ <keyword>private</keyword>
+ <keyword>protected</keyword>
+ <keyword>protocol</keyword>
+ <keyword>public</keyword>
+ <keyword>selector</keyword>
+ <keyword>synchronized</keyword>
+ <keyword>throw</keyword>
+ <keyword>try</keyword>
+ </context>
+
+ <context style-ref="preprocessor">
+ <match extended="true">
+ \@
+ (import)\s*
+ (".*?"|<.*>)
+ </match>
+ <include>
+ <context id="included-file" sub-pattern="2" style-ref="included-file"/>
+ </include>
+ </context>
+
+ <context style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
+ <start>\@"</start>
+ <end>"</end>
+ </context>
+ </include>
+ </context>
+
+ <!-- ObjJ-specific stuff (i.e. stuff which is not C), which isn't
+ good to highlight in C headers -->
+ <context id="sources">
+ <include>
+ <context style-ref="boolean">
+ <keyword>YES</keyword>
+ <keyword>NO</keyword>
+ </context>
+
+ <context style-ref="keyword">
+ <keyword>self</keyword>
+ <keyword>super</keyword>
+ <keyword>_cmd</keyword>
+ </context>
+
+ <context style-ref="type">
+ <keyword>BOOL</keyword>
+ <keyword>Class</keyword>
+ <keyword>id</keyword>
+ <keyword>int</keyword>
+ <keyword>IMP</keyword>
+ <keyword>SEL</keyword>
+ </context>
+
+ <context style-ref="null-value">
+ <keyword>nil</keyword>
+ <keyword>Nil</keyword>
+ </context>
+ </include>
+ </context>
+
+ <!-- actual language definition: Objective-J-specific stuff plus everything from JS -->
+ <context id="objj" class="no-spell-check">
+ <include>
+ <context ref="headers"/>
+ <context ref="sources"/>
+ <context ref="js:js"/>
+ </include>
+ </context>
+ </definitions>
+
+</language>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3ae34a0..b9e9b05 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -53,6 +53,7 @@ data/language-specs/mallard.lang
data/language-specs/nemerle.lang
data/language-specs/nsis.lang
data/language-specs/objc.lang
+data/language-specs/objj.lang
data/language-specs/ocaml.lang
data/language-specs/ocl.lang
data/language-specs/ooc.lang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]