Source-highlight Library
delimitedlangelem.h
1//
2// C++ Interface: delimitedlangelem
3//
4// Description:
5//
6//
7// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef DELIMITEDLANGELEM_H
13#define DELIMITEDLANGELEM_H
14
15#include "statestartlangelem.h"
16
17namespace srchilite {
18
19class StringDef;
20
26// doublecpp: forward declarations, DO NOT MODIFY
27class HighlightState; // file: highlightstate.h
28class HighlightStateBuilder; // file: highlightstatebuilder.h
29// doublecpp: end, DO NOT MODIFY
30
32{
33private:
34 StringDef *start;
35 StringDef *end;
36 StringDef *escape;
37 bool multiline;
38 bool nested;
39
40public:
49 DelimitedLangElem(const std::string &n, StringDef *s, StringDef *e,
50 StringDef *es, bool multi, bool nes);
51
53
58 virtual const std::string toString() const;
59
65 virtual const std::string toStringOriginal() const;
66
71 return start;
72 }
73
77 StringDef *getEnd() const {
78 return end;
79 }
80
85 return escape;
86 }
87
91 bool isMultiline() const {
92 return multiline;
93 }
94
98 bool isNested() const {
99 return nested;
100 }
101// doublecpp: dispatch methods, DO NOT MODIFY
102public:
103virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state);
104// doublecpp: end, DO NOT MODIFY
105};
106
107}
108
109#endif
Definition: delimitedlangelem.h:32
virtual const std::string toStringOriginal() const
return the original representation (without any preprocessing); this is useful for printing errors
Definition: delimitedlangelem.cpp:48
virtual const std::string toString() const
return the string representation (with preprocessing)
Definition: delimitedlangelem.cpp:41
StringDef * getStart() const
Definition: delimitedlangelem.h:70
StringDef * getEnd() const
Definition: delimitedlangelem.h:77
StringDef * getEscape() const
Definition: delimitedlangelem.h:84
DelimitedLangElem(const std::string &n, StringDef *s, StringDef *e, StringDef *es, bool multi, bool nes)
Definition: delimitedlangelem.cpp:24
bool isMultiline() const
Definition: delimitedlangelem.h:91
bool isNested() const
Definition: delimitedlangelem.h:98
Builds an HighlightState from the language definition file collected structures.
Definition: highlightstatebuilder.h:22
Represents a state during the highlighting (e.g., comment state, string state, etc....
Definition: highlightstate.h:47
A language element that may start a new state/environment.
Definition: statestartlangelem.h:25
represent a string for a language definition file's element
Definition: stringdef.h:25
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13