CodeView  Version0.4
 All Classes Functions Variables
format_perl.h
1 /* libcodeview.so - A programmers editor widget for Syllable
2  Copyright (c) 2001 Andreas Engh-Halstvedt
3  Copyright (c) 2003 Henrik Isaksson
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public
16  License along with this library; if not, write to the Free
17  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18  MA 02111-1307, USA
19 */
20 
21 #ifndef F_CODEVIEW_FORMAT_PERL_H
22 #define F_CODEVIEW_FORMAT_PERL_H
23 
24 #include "format.h"
25 
26 namespace cv
27 {
28 
32 class Format_Perl : public Format
33 {
34  public:
35  Format_Perl();
36 
37  uint GetStyleCount();
38  const os::String& GetStyleName( char );
39  void SetStyle( char, const CodeViewStyle& );
40  const CodeViewStyle& GetStyle( char );
41 
42  CodeViewContext Parse( const os::String &cLine, os::String &cFormat, CodeViewContext cookie );
43 
44  os::String GetIndentString( const os::String &cText, bool bUseTabs, uint nTabSize );
45 
46  uint GetPreviousWordLimit( const os::String&, uint nChr );
47  uint GetNextWordLimit( const os::String&, uint nChr );
48 
49  private:
50  enum {
51  F_DEFAULT = 0,
52  F_COMMENT,
53  F_STRING,
54  F_KEYWORD,
55 
56  FORMAT_COUNT//this is not a format!
57  };
58 
59  CodeViewStyle styles[FORMAT_COUNT];
60 
61  void FindWords(const os::String&, os::String&);
62 };
63 
64 } /* namespace cv */
65 
66 #endif /* F_CODEVIEW_FORMAT_PERL_H */