Bug#285102: libgtksourceview-common: gtksourceview don't
highlight numeric types in python
Leonardo Soto
Leonardo Soto <leonardosoto@tutopia.com>, 285102@bugs.debian.org
Fri, 10 Dec 2004 13:52:06 -0300
Package: libgtksourceview-common
Version: 1.1.1-1
Severity: minor
There is no mention to numeric python types in python language
definition (share/gtksourceview-1.0/language-specs/python.lang)
A trivial patch (stolen from c.lang, as python and c numbers has the same syntax
AFAIK) would be:
--- /tmp/python.lang.orig 2004-12-10 13:38:41.000000000 -0300
+++ python.lang 2004-12-10 13:34:25.000000000 -0300
@@ -191,5 +191,23 @@
<pattern-item _name = "Self" style = "Data Type">
<regex>\bself\b</regex>
</pattern-item>
+ <pattern-item _name = "Decimal" style = "Decimal">
+
<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
+ </pattern-item>
+
+ <pattern-item _name = "Floating Point Number" style = "Floating
Point">
+
<regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
+ </pattern-item>
+
+ <pattern-item _name = "Octal Number" style = "Base-N Integer">
+
<regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
+ </pattern-item>
+
+ <pattern-item _name = "Hex Number" style = "Base-N Integer">
+
<regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
+ </pattern-item>
+
+
+
</language>
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (900, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9leo
Locale: LANG=es_CL, LC_CTYPE=es_CL (charmap=ISO-8859-1)
-- no debconf information