After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674844 - lang files for MXML and actionscript
lang files for MXML and actionscript
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-26 05:00 UTC by pablo
Modified: 2012-08-07 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
syntax files for mxml and actionscript (20.50 KB, application/octet-stream)
2012-04-26 05:00 UTC, pablo
  Details
actionscript.lang (9.05 KB, patch)
2012-05-05 19:19 UTC, pablo
none Details | Review
mxml.lang (10.47 KB, patch)
2012-05-05 19:20 UTC, pablo
none Details | Review
actionscript.lang (9.03 KB, patch)
2012-05-05 19:33 UTC, pablo
none Details | Review
maxml.lang (9.38 KB, patch)
2012-05-05 19:33 UTC, pablo
needs-work Details | Review
include actionscript.lang and mxml.lang (860 bytes, patch)
2012-05-05 19:36 UTC, pablo
none Details | Review
Actionscript lang file (9.61 KB, patch)
2012-07-28 15:16 UTC, pablo
needs-work Details | Review
mxml language file (2.69 KB, patch)
2012-08-07 20:44 UTC, pablo
none Details | Review
Actionscript lang file (9.56 KB, patch)
2012-08-07 20:45 UTC, pablo
none Details | Review
POTFILES.in (878 bytes, patch)
2012-08-07 20:45 UTC, pablo
none Details | Review
Makefile.am (770 bytes, patch)
2012-08-07 20:46 UTC, pablo
none Details | Review
mxml.lang (2.83 KB, patch)
2012-08-07 21:13 UTC, pablo
none Details | Review

Description pablo 2012-04-26 05:00:03 UTC
Created attachment 212847 [details]
syntax files for mxml and actionscript

Please see attached syntax files for MXML(flex) and actionscript.
MXML can have blocks of css actionscript and xml similar to xhtml.

Original version taken from
http://www.conic.se/blog/posts/8/

I've added support to <fx:Script> block in addition to <mx:Script> by replacing the following lines:
--<start>&lt;mx:Script&gt;</start>
--<end>&lt;/mx:Script&gt;</end>
with:
++<start>&lt;(fx:Script|mx:Script)&gt;</start>
++<end>&lt;/\%{1@start}&gt;</end>

Thanks
Comment 1 pablo 2012-05-05 19:19:48 UTC
Created attachment 213514 [details] [review]
actionscript.lang
Comment 2 pablo 2012-05-05 19:20:26 UTC
Created attachment 213515 [details] [review]
mxml.lang
Comment 3 pablo 2012-05-05 19:33:33 UTC
Created attachment 213519 [details] [review]
actionscript.lang
Comment 4 pablo 2012-05-05 19:33:56 UTC
Created attachment 213520 [details] [review]
maxml.lang
Comment 5 pablo 2012-05-05 19:36:42 UTC
Created attachment 213522 [details] [review]
include actionscript.lang and mxml.lang
Comment 6 pablo 2012-07-28 15:16:18 UTC
Created attachment 219787 [details] [review]
Actionscript lang file
Comment 7 Paolo Borelli 2012-08-07 18:17:26 UTC
Review of attachment 213522 [details] [review]:

the files should also be added to Makefile.am
Comment 8 Paolo Borelli 2012-08-07 18:22:06 UTC
Review of attachment 213520 [details] [review]:

::: data/language-specs/mxml.lang
@@ +4,3 @@
+ This file is part of GtkSourceView
+
+ Authors: Marco Barisione, Emanuele Aina, Paolo Borelli, Markus Johnsson

Authors are wrong here... I am pretty sure me, Marco and Emanuale did not write this

@@ +27,3 @@
+<language id="mxml" _name="MXML" version="2.0" _section="Markup">
+  <metadata>
+    <property name="mimetypes">application/mxml;text/mxml</property>

why two mime types? are these mime types officially included in freedesktop's shared-mime-info database?

@@ +61,3 @@
+    </context>
+
+    <context id="unallowed-chars" style-ref="error" extend-parent="false">

Why is this file duplicating much of xml.lang? it should either extend xml.lang if it is an xml syntax (see e.g. docbook.lang for an example) or should at least include xml's contexts instead of duplicating them
Comment 9 Paolo Borelli 2012-08-07 18:22:26 UTC
Review of attachment 219787 [details] [review]:

::: data/language-specs/actionscript.lang
@@ +25,3 @@
+<language id="actionscript" _name="ActionScript" version="2.0" _section="Sources">
+  <metadata>
+      <property name="mimetypes">text/x-actionscript</property>

indentation must be 2 spaces

@@ +50,3 @@
+  <definitions>
+
+      <context id="string" style-ref="string" end-at-line-end="true">

indentation must be 2 spaces

@@ +223,3 @@
+
+    <context id="future-reserved-words" style-ref="reserved">
+        <keyword>goto</keyword>

ditto
Comment 10 pablo 2012-08-07 20:44:12 UTC
Created attachment 220603 [details] [review]
mxml language file
Comment 11 pablo 2012-08-07 20:45:06 UTC
Created attachment 220604 [details] [review]
Actionscript lang file
Comment 12 pablo 2012-08-07 20:45:32 UTC
Created attachment 220605 [details] [review]
POTFILES.in
Comment 13 pablo 2012-08-07 20:46:03 UTC
Created attachment 220606 [details] [review]
Makefile.am
Comment 14 pablo 2012-08-07 21:13:04 UTC
Created attachment 220607 [details] [review]
mxml.lang
Comment 15 Paolo Borelli 2012-08-07 21:25:49 UTC
thanks for updating the lang files. I committed everythingThis problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.