1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 1999-2009
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6
7 #ifndef LANGELEM_H
8 #define LANGELEM_H
9
10 #include "parserinfo.h"
11
13
17 // doublecpp: forward declarations, DO NOT MODIFY
18 class HighlightState; // file: highlightstate.h
19 class HighlightStateBuilder; // file: highlightstatebuilder.h
20 class LangElemsPrinter; // file: langelemsprinter.h
21 // doublecpp: end, DO NOT MODIFY
22
24 {
25 private:
30 // whether this substitutes an existing language element
31 bool subst;
32
33 public:
35 name(n), redef(false), subst(false) {
36 }
37
39 }
40
41 const std::string getName() const {
43 }
44
51 }
52
59
60 bool isRedef() const {
62 }
63 void setRedef() {
64 redef = true;
65 }
66 bool isSubst() const {
67 return subst;
68 }
69 void setSubst() {
70 subst = true;
71 }
72
77
78 // doublecpp: dispatch methods, DO NOT MODIFY
79 public:
80 virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state);
81 virtual void dispatch_collect_const(LangElemsPrinter *);
82 // doublecpp: end, DO NOT MODIFY
83 };
84
85 }
86
87 #endif
const std::string toStringParserInfo() const
const std::string name
the name for this language element
Definition: langelem.h:27
Definition: langelem.h:23
virtual const std::string toString() const
return the string representation (with preprocessing)
Definition: langelem.h:49
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
bool redef
whether this redefs an existing language element
Definition: langelem.h:29
Stores information about the file name and the line number of a generic element created during parsin...
Definition: parserinfo.h:23
virtual const std::string toStringOriginal() const =0
return the original representation (without any preprocessing); this is useful for printing errors ...