| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// Copyright : (C) 2015 Eran Ifrah |
| 5 |
// File name : CxxScannerBase.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#ifndef CXXSCANNERBASE_H |
| 27 |
#define CXXSCANNERBASE_H |
| 28 |
|
| 29 |
#include <wx/filename.h> |
| 30 |
#include "CxxLexerAPI.h" |
| 31 |
|
| 32 |
class CxxPreProcessor; |
| 33 |
class WXDLLIMPEXP_CL CxxScannerBase |
| 34 |
{ |
| 35 |
protected: |
| 36 |
Scanner_t m_scanner; |
| 37 |
wxFileName m_filename; |
| 38 |
size_t m_options; |
| 39 |
CxxPreProcessor* m_preProcessor; |
| 40 |
|
| 41 |
public: |
| 42 |
CxxScannerBase(CxxPreProcessor* preProcessor, const wxFileName& filename); |
| 43 |
virtual ~CxxScannerBase(); |
| 44 |
|
| 45 |
/** |
| 46 |
* @brief main loop |
| 47 |
*/ |
| 48 |
void Parse(); |
| 49 |
|
| 50 |
/** |
| 51 |
* @brief |
| 52 |
* @param token |
| 53 |
*/ |
| 54 |
virtual void OnToken(CxxLexerToken& token) { wxUnusedVar(token); } |
| 55 |
}; |
| 56 |
|
| 57 |
#endif // CXXSCANNERBASE_H |