headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / debugger / source_language / c_family / CLanguageFamilySyntaxHighlightInfo.h
blob5bfe24ba648540274f5db8a24d9a066c2b127e03
1 /*
2 * Copyright 2014, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef C_LANGUAGE_FAMILY_SYNTAX_HIGHLIGHT_INFO_H
6 #define C_LANGUAGE_FAMILY_SYNTAX_HIGHLIGHT_INFO_H
9 #include "SyntaxHighlighter.h"
11 #include <ObjectList.h>
14 namespace CLanguage {
15 class Token;
16 class Tokenizer;
19 class TeamTypeInformation;
22 class CLanguageFamilySyntaxHighlightInfo : public SyntaxHighlightInfo {
23 public:
24 CLanguageFamilySyntaxHighlightInfo(
25 LineDataSource* source,
26 CLanguage::Tokenizer* tokenizer,
27 TeamTypeInformation* info);
28 virtual ~CLanguageFamilySyntaxHighlightInfo();
30 virtual int32 GetLineHighlightRanges(int32 line,
31 int32* _columns,
32 syntax_highlight_type* _types,
33 int32 maxCount);
35 private:
36 class LineInfo;
37 typedef BObjectList<LineInfo> LineInfoList;
38 struct SyntaxPair;
40 private:
41 status_t _ParseLines();
42 status_t _ParseLine(int32 line,
43 syntax_highlight_type& _lastType,
44 LineInfo*& _info);
45 syntax_highlight_type _MapTokenToSyntaxType(
46 const CLanguage::Token& token);
47 private:
48 LineDataSource* fHighlightSource;
49 CLanguage::Tokenizer* fTokenizer;
50 TeamTypeInformation* fTypeInfo;
51 LineInfoList fLineInfos;
55 #endif // C_LANGUAGE_FAMILY_SYNTAX_HIGHLIGHT_INFO_H