Permalink
Browse files

Add sql syntax highlighting to code blocks

  • Loading branch information...
artur-kink committed Nov 22, 2016
1 parent 71d7a93 commit adf4a90340921cf7a120ae918af776355cf8ca0f
Showing with 548 additions and 2 deletions.
  1. +2 −0 src/CMakeLists.txt
  2. +1 −0 src/context.cpp
  3. +1 −0 src/docsets.cpp
  4. +2 −0 src/doxygen.cpp
  5. +37 −0 src/sqlcode.h
  6. +434 −0 src/sqlcode.l
  7. +65 −0 src/sqlscanner.h
  8. +2 −1 src/types.h
  9. +4 −1 src/util.cpp
@@ -116,6 +116,7 @@ FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp
FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(sqlcode sqlcode.l ${GENERATED_SRC}/sqlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")
BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}")
@@ -156,6 +157,7 @@ add_library(_doxygen STATIC
${GENERATED_SRC}/commentscan.cpp
${GENERATED_SRC}/constexp.cpp
${GENERATED_SRC}/xmlcode.cpp
${GENERATED_SRC}/sqlcode.cpp
#
${GENERATED_SRC}/ce_parse.cpp
#
@@ -1522,6 +1522,7 @@ class DefinitionContext
case SrcLangExt_Fortran: result="fortran"; break;
case SrcLangExt_VHDL: result="vhdl"; break;
case SrcLangExt_XML: result="xml"; break;
case SrcLangExt_SQL: result="sql"; break;
case SrcLangExt_Tcl: result="tcl"; break;
case SrcLangExt_Markdown: result="markdown"; break;
}
@@ -331,6 +331,7 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
case SrcLangExt_Fortran: lang="fortran"; break; // Fortran
case SrcLangExt_VHDL: lang="vhdl"; break; // VHDL
case SrcLangExt_XML: lang="xml"; break; // DBUS XML
case SrcLangExt_SQL: lang="sql"; break; // Sql
case SrcLangExt_Tcl: lang="tcl"; break; // Tcl
case SrcLangExt_Markdown:lang="markdown"; break; // Markdown
case SrcLangExt_Unknown: lang="unknown"; break; // should not happen!
@@ -72,6 +72,7 @@
#include "pyscanner.h"
#include "fortranscanner.h"
#include "xmlscanner.h"
#include "sqlscanner.h"
#include "tclscanner.h"
#include "code.h"
#include "objcache.h"
@@ -10002,6 +10003,7 @@ void initDoxygen()
Doxygen::parserManager->registerParser("fortranfixed", new FortranLanguageScannerFixed);
Doxygen::parserManager->registerParser("vhdl", new VHDLLanguageScanner);
Doxygen::parserManager->registerParser("xml", new XMLScanner);
Doxygen::parserManager->registerParser("sql", new SQLScanner);
Doxygen::parserManager->registerParser("tcl", new TclLanguageScanner);
Doxygen::parserManager->registerParser("md", new MarkdownFileParser);
@@ -0,0 +1,37 @@
/******************************************************************************
*
*
*
* Copyright (C) 1997-2014 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef SQLCODE_H
#define SQLCODE_H
#include "types.h"
class CodeOutputInterface;
class FileDef;
class MemberDef;
class QCString;
class Definition;
extern void parseSqlCode(CodeOutputInterface &,const char *,const QCString &,
bool ,const char *,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
MemberDef *memberDef,bool showLineNumbers,Definition *searchCtx,
bool collectXRefs);
extern void resetSqlCodeParserState();
#endif
Oops, something went wrong.

0 comments on commit adf4a90

Please sign in to comment.