Last change
on this file since 681 was 681, checked in by dai_9181, 16 years ago |
・TinyXMLをabdevプロジェクトで使えるようにした。
・コードハイライターを汎用的に実装しなおした。syntaxファイルを読み込む仕様とした。
|
File size:
1.2 KB
|
Rev | Line | |
---|
[681] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | namespace ActiveBasic{ namespace IDE{ namespace WindowComponents{ namespace CodeEditor{
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | struct ReservedKeywordWithQuickHelp
|
---|
| 7 | {
|
---|
| 8 | std::string keyword;
|
---|
| 9 | std::string quickHelp;
|
---|
| 10 | };
|
---|
| 11 | typedef std::vector<ReservedKeywordWithQuickHelp> ReservedKeywordsWithQuickHelp;
|
---|
| 12 | struct Syntax
|
---|
| 13 | {
|
---|
| 14 | std::string commentSingle;
|
---|
| 15 | std::string commentMultiBegin;
|
---|
| 16 | std::string commentMultiEnd;
|
---|
| 17 | Jenga::Common::Strings quoteMarks;
|
---|
| 18 | Jenga::Common::Strings reservedSimpleKeywords;
|
---|
| 19 | ReservedKeywordsWithQuickHelp reservedKeywordsWithQuickHelp;
|
---|
| 20 | };
|
---|
| 21 | class Language
|
---|
| 22 | {
|
---|
| 23 | std::string name;
|
---|
| 24 | Syntax syntax;
|
---|
| 25 | public:
|
---|
| 26 | const std::string &GetName() const
|
---|
| 27 | {
|
---|
| 28 | return name;
|
---|
| 29 | }
|
---|
| 30 | const Syntax &GetSyntax() const
|
---|
| 31 | {
|
---|
| 32 | return syntax;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | void Load( const TiXmlDocument &doc );
|
---|
| 36 | bool IsExistKeyword( const std::string &keyword ) const;
|
---|
| 37 | bool IsExistReservedKeywordWithQuickHelp( const std::string &keyword ) const;
|
---|
| 38 | const std::string &GetReservedKeywordWithQuickHelp( const std::string &keyword ) const;
|
---|
| 39 | bool IsQuoteMark( char c ) const;
|
---|
| 40 | };
|
---|
| 41 | class Languages
|
---|
| 42 | : public std::map<std::string, Language>
|
---|
| 43 | {
|
---|
| 44 | void Add( const std::string &xmlPath );
|
---|
| 45 | public:
|
---|
| 46 | void LoadFiles( const std::string &dirPath );
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | }}}}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.