Permalink
Browse files

Added: custom style for SQL

  • Loading branch information...
mezomish
mezomish committed Feb 24, 2011
1 parent 765ef21 commit cf93e011713cd0545c6ba8d8d200c2e564378952
Showing with 26 additions and 0 deletions.
  1. +13 −0 hlschemes/sql.xml
  2. +13 −0 src/app/qsci/LexerStorage.cpp
View
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE JuffScheme>
+<JuffScheme>
+<scheme name="SQL">
+ <style name="comment" color="#108040" italic="true" />
+ <style name="keyword" color="#141484" bold="true" />
+ <style name="number" color="#0080a0" />
+ <style name="operator" color="#400000" />
+ <style name="singleString" color="#a00000" />
+ <style name="doubleString" color="#a000c0" />
+ <style name="identifier" color="#303030" />
+</scheme>
+</JuffScheme>
@@ -467,6 +467,19 @@ void LSInterior::readCustomStyle(const QString& name) {
<< Rule(styles["error"], QList<int>() << QsciLexerRuby::Error);
schemes_[name] = scheme;
}
+ else if ( name.compare("SQL") == 0 ) {
+ scheme = new Scheme();
+ scheme->defaultStyle = styles["default"];
+ scheme->rules << Rule(styles["comment"], QList<int>() << QsciLexerSQL::Comment << QsciLexerSQL::CommentDoc << QsciLexerSQL::CommentLine << QsciLexerSQL::CommentLineHash)
+ << Rule(styles["number"], QList<int>() << QsciLexerSQL::Number)
+ << Rule(styles["keyword"], QList<int>() << QsciLexerSQL::Keyword)
+ << Rule(styles["operator"], QList<int>() << QsciLexerSQL::Operator)
+ << Rule(styles["identifier"], QList<int>() << QsciLexerSQL::Identifier)
+ << Rule(styles["singleString"], QList<int>() << QsciLexerSQL::SingleQuotedString)
+ << Rule(styles["doubleString"], QList<int>() << QsciLexerSQL::DoubleQuotedString)
+ ;
+ schemes_[name] = scheme;
+ }
else if ( name.compare("TeX") == 0 ) {
scheme = new Scheme();
scheme->defaultStyle = styles["default"];

0 comments on commit cf93e01

Please sign in to comment.