Rev | Line | |
---|
[184] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <CodeGenerator.h>
|
---|
[199] | 4 | #include <NamespaceSupporter.h>
|
---|
[256] | 5 | #include <Meta.h>
|
---|
[224] | 6 | #include <DataTable.h>
|
---|
[225] | 7 | #include <CodeGenerator.h>
|
---|
[256] | 8 | #include <Linker.h>
|
---|
[193] | 9 |
|
---|
[184] | 10 | class Compiler
|
---|
| 11 | {
|
---|
[199] | 12 | // 名前空間サポート
|
---|
| 13 | NamespaceSupporter namespaceSupporter;
|
---|
| 14 |
|
---|
[265] | 15 | // オブジェクトモジュール
|
---|
| 16 | ObjectModule *pObjectModule;
|
---|
| 17 | ObjectModule *pNowObjectModule;
|
---|
| 18 |
|
---|
[184] | 19 | public:
|
---|
[193] | 20 |
|
---|
[265] | 21 | Compiler()
|
---|
| 22 | : pObjectModule( new ObjectModule )
|
---|
| 23 | , pNowObjectModule( pObjectModule )
|
---|
| 24 | {
|
---|
| 25 | }
|
---|
| 26 | ~Compiler()
|
---|
| 27 | {
|
---|
| 28 | delete pObjectModule;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
[199] | 31 | NamespaceSupporter &GetNamespaceSupporter()
|
---|
| 32 | {
|
---|
| 33 | return namespaceSupporter;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
[225] | 36 | // コード生成機構
|
---|
| 37 | CodeGenerator codeGenerator;
|
---|
| 38 |
|
---|
[256] | 39 | // リンカ
|
---|
| 40 | Linker linker;
|
---|
| 41 |
|
---|
[265] | 42 | ObjectModule &GetObjectModule()
|
---|
| 43 | {
|
---|
| 44 | return *pNowObjectModule;
|
---|
| 45 | }
|
---|
| 46 | void SelectObjectModule( ObjectModule &objectModule )
|
---|
| 47 | {
|
---|
| 48 | pNowObjectModule = &objectModule;
|
---|
| 49 | }
|
---|
| 50 |
|
---|
[193] | 51 | static bool StringToType( const std::string &typeName, Type &type );
|
---|
| 52 | static const std::string TypeToString( const Type &type );
|
---|
[206] | 53 |
|
---|
| 54 | // コンパイル中のクラス
|
---|
| 55 | const CClass *pCompilingClass;
|
---|
[184] | 56 | };
|
---|
[193] | 57 |
|
---|
[195] | 58 | extern Compiler compiler;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.