dhaumann requested changes to this revision.
dhaumann added a comment.
This revision now requires changes to proceed.


  Looks mostly good, but there are some minor issues we first need to address:
  
  - dsControlFlow and similar default styles were added with KDE Frameworks 5, 
so kateversion="5.0" is required in the header
  - WordDetect for things like "end if" is not sensitive to multiple spaces 
anymore. Are you sure this is correct? If not, please keep RegExpr.
  
  Please provide an updated revision, I think the next one is good to go in. :-)

INLINE COMMENTS

> sql-mysql.xml:9
>  -->
> -<language name="SQL (MySQL)" version="3" kateversion="3.4" 
> section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" 
> casesensitive="0" author="Shane Wright (m...@shanewright.co.uk)" license="">
> +<language name="SQL (MySQL)" version="4" kateversion="3.4" 
> section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" 
> casesensitive="0" author="Shane Wright (m...@shanewright.co.uk)" license="">
>    <highlighting>

kateversion="5.0" is required due to dsControlFlow.

> sql-oracle.xml:4
>  <!-- Oracle SQL, syntax definition based on sql.xml by Yury Lebedev -->
> -<language name="SQL (Oracle)" version="4" kateversion="2.4" 
> section="Database" 
> extensions="*.sql;*.SQL;*.ddl;*.DDL;*.trg;*.TRG;*.spc;*.SPC;*.bdy;*.DBY" 
> mimetype="text/x-sql" casesensitive="0" author="Andrey Karepin 
> (egdf...@opensuse.org)" license="LGPL">
> +<language name="SQL (Oracle)" version="5" kateversion="2.4" 
> section="Database" 
> extensions="*.sql;*.SQL;*.ddl;*.DDL;*.trg;*.TRG;*.spc;*.SPC;*.bdy;*.DBY" 
> mimetype="text/x-sql" casesensitive="0" author="Andrey Karepin 
> (egdf...@opensuse.org)" license="LGPL">
>    <highlighting>

Since you are using dsControlFlow and similar new itemDatas, you have to change 
kateversion="5.0".

> sql-oracle.xml:1873
> +        <WordDetect attribute="ControlFlow" context="#stay" String="if" 
> beginRegion="if_block" insensitive="true"/>
> +        <WordDetect attribute="ControlFlow" context="#stay" String="end if" 
> endRegion="if_block" insensitive="true"/>
> +        <WordDetect attribute="ControlFlow" context="#stay" String="case" 
> beginRegion="case_block" insensitive="true"/>

Hm, I can see that WordDetect is possibly faster than the RegExpr here. Still, 
I *assume* there are arbitrary many spaces allowed in "end if". If (and only 
if) this is true, then I would prefer to keep the RegExpr variant. Same for the 
others.

The changes from StringDetect to WordDetect are certainly fine.

> sql-postgresql.xml:6
>    -->
> -<language name="SQL (PostgreSQL)" version="5" kateversion="2.4" 
> section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" 
> casesensitive="0" author="Shane Wright (m...@shanewright.co.uk)" license="">
> +<language name="SQL (PostgreSQL)" version="6" kateversion="2.4" 
> section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" 
> casesensitive="0" author="Shane Wright (m...@shanewright.co.uk)" license="">
>    <highlighting>

kateversion="5.0" :-)

> sql.xml:8
>  <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
> -<language name="SQL" version="3" kateversion="2.4" section="Database" 
> extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" 
> author="Yury Lebedev (yurylebe...@mail.ru)" license="LGPL">
> +<language name="SQL" version="4" kateversion="2.4" section="Database" 
> extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" 
> author="Yury Lebedev (yurylebe...@mail.ru)" license="LGPL">
>    <highlighting>

kateversion="5.0"

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D11470

To: jpoelen, #framework_syntax_highlighting, dhaumann
Cc: #frameworks, michaelh, ngraham, bruns

Reply via email to