-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 734099 - Add support for non-parsed language
- Loading branch information
Dimitri van Heesch
committed
Aug 4, 2014
1 parent
6f0269e
commit 0dd5939
Showing
9 changed files
with
179 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/****************************************************************************** | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#include "fileparser.h" | ||
#include "outputgen.h" | ||
|
||
void FileParser::parseCode(CodeOutputInterface &codeOutIntf, | ||
const char *, // scopeName | ||
const QCString & input, | ||
SrcLangExt, // lang | ||
bool, // isExampleBlock | ||
const char *, // exampleName | ||
FileDef *, // fileDef | ||
int startLine, | ||
int endLine, | ||
bool, // inlineFragment | ||
MemberDef *, // memberDef | ||
bool showLineNumbers, | ||
Definition *, // searchCtx, | ||
bool // collectXRefs | ||
) | ||
{ | ||
int lineNr = startLine!=-1 ? startLine : 1; | ||
int length = input.length(); | ||
int i=0; | ||
while (i<length && (endLine==-1 || lineNr<=endLine)) | ||
{ | ||
int j=i; | ||
while (j<length && input[j]!='\n') j++; | ||
QCString lineStr = input.mid(i,j-i); | ||
codeOutIntf.startCodeLine(showLineNumbers); | ||
if (showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr); | ||
codeOutIntf.codify(lineStr); | ||
codeOutIntf.endCodeLine(); | ||
lineNr++; | ||
i=j+1; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/****************************************************************************** | ||
* | ||
* 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 FILEPARSER_H | ||
#define FILEPARSER_H | ||
|
||
#include "parserintf.h" | ||
|
||
/** @brief General file parser */ | ||
class FileParser : public ParserInterface | ||
{ | ||
public: | ||
virtual ~FileParser() {} | ||
void startTranslationUnit(const char *) {} | ||
void finishTranslationUnit() {} | ||
void parseInput(const char *, const char *,Entry *, bool, QStrList &) {} | ||
bool needsPreprocessing(const QCString &) { return FALSE; } | ||
void parseCode(CodeOutputInterface &codeOutIntf, | ||
const char *scopeName, | ||
const QCString &input, | ||
SrcLangExt lang, | ||
bool isExampleBlock, | ||
const char *exampleName=0, | ||
FileDef *fileDef=0, | ||
int startLine=-1, | ||
int endLine=-1, | ||
bool inlineFragment=FALSE, | ||
MemberDef *memberDef=0, | ||
bool showLineNumbers=TRUE, | ||
Definition *searchCtx=0, | ||
bool collectXRefs=TRUE | ||
); | ||
void resetCodeParserState() {} | ||
void parsePrototype(const char *) {} | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters