summaryrefslogtreecommitdiffstats
path: root/kate/data/sql-postgresql.xml
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-11 16:14:23 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-11 16:14:23 -0600
commit7439a4b0e05832e047040ab8bf9ef13abd9288b2 (patch)
tree3a15e3033fa66b2d947daa14e6807b39f3dc84d1 /kate/data/sql-postgresql.xml
parent783973a7d6910fee50d90fcfaf439ae3bbb15b8c (diff)
downloadtdelibs-7439a4b0e05832e047040ab8bf9ef13abd9288b2.tar.gz
tdelibs-7439a4b0e05832e047040ab8bf9ef13abd9288b2.zip
Update kate synatax highlighting files
This closes Bug 764
Diffstat (limited to 'kate/data/sql-postgresql.xml')
-rw-r--r--kate/data/sql-postgresql.xml18
1 files changed, 14 insertions, 4 deletions
diff --git a/kate/data/sql-postgresql.xml b/kate/data/sql-postgresql.xml
index cae648c0e..2c72c9391 100644
--- a/kate/data/sql-postgresql.xml
+++ b/kate/data/sql-postgresql.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- PostgreSQL SQL, syntax definition based on sql.xml by Yury Lebedev -->
-<language name="SQL (PostgreSQL)" version="1.09" kateversion="2.4" section="Database" extensions="*.sql;*.SQL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license="">
+<language name="SQL (PostgreSQL)" version="1.10" kateversion="2.4" section="Database" extensions="*.sql;*.SQL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license="">
<highlighting>
<list name="keywords">
<item> ABORT </item>
@@ -649,7 +649,7 @@
<item> PATH </item>
<item> POINT </item>
<item> POLYGON </item>
- <!-- network address type, TEXT is omitted as its more commonly a data type -->
+ <!-- network address type, TEXT is omitted as it is more commonly a data type -->
<item> BROADCAST </item>
<item> HOST </item>
<item> MASKLEN </item>
@@ -731,6 +731,8 @@
</list>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
+ <!-- HACK: don't jump into MultiLineString for CREATE FUNCTION $funcName$...$funcName$ -->
+ <StringDetect String="CREATE FUNCTION" context="CreateFunction" attribute="Keyword" />
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<keyword attribute="Operator" context="#stay" String="operators"/>
<keyword attribute="Function" context="#stay" String="functions"/>
@@ -754,10 +756,18 @@
<AnyChar attribute="Symbol" context="#stay" String=":&#38;"/>
<RegExpr attribute="Symbol" context="#stay" String="/$" column="0"/>
<RegExpr attribute="Preprocessor" context="Preprocessor" String="@@?[^@ \t\r\n]" column="0"/>
- <RegExpr attribute="Operator" context="MultiLineString" String="\$([^$]*)\$" dynamic="true"/>
+ <RegExpr attribute="Operator" context="MultiLineString" String="\$([^\$\n\r]*)\$" dynamic="true"/>
+ </context>
+ <context name="CreateFunction" attribute="Normal Text" lineEndContext="#stay">
+ <RegExpr attribute="Function" context="FunctionBody" String="\$([^\$\n\r]*)\$" dynamic="true"/>
+ <IncludeRules context="Normal" />
+ </context>
+ <context name="FunctionBody" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
+ <RegExpr attribute="Function" context="#pop#pop" String="\$%1\$" dynamic="true"/>
+ <IncludeRules context="Normal" />
</context>
<context name="MultiLineString" attribute="String" lineEndContext="#stay" dynamic="true">
- <RegExpr attribute="Operator" context="Normal" String="\$%1\$" dynamic="true"/>
+ <RegExpr attribute="Operator" context="#pop" String="\$%1\$" dynamic="true"/>
</context>
<context name="String" attribute="String" lineEndContext="#stay">
<LineContinue attribute="String" context="#pop"/>