1 | #pragma once
|
---|
2 |
|
---|
3 | namespace ActiveBasic{ namespace Compiler{
|
---|
4 |
|
---|
5 |
|
---|
6 | class LexicalAnalyzer
|
---|
7 | {
|
---|
8 | public:
|
---|
9 |
|
---|
10 | // 名前空間を収集
|
---|
11 | static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
|
---|
12 |
|
---|
13 | // フルネーム識別子をシンボルに変換する
|
---|
14 | static Symbol FullNameToSymbol( const char *fullName );
|
---|
15 | static Symbol FullNameToSymbol( const std::string &fullName );
|
---|
16 |
|
---|
17 | // 列挙型を収集
|
---|
18 | static void CollectEnumMembers( EnumInfo &enumInfo, const char *buffer, int nowLine );
|
---|
19 | static void CollectEnums( const char *source, EnumInfoCollection &enums );
|
---|
20 | static std::string GenerateEnumsSourceCode( const EnumInfoCollection &enums );
|
---|
21 |
|
---|
22 | // クラスの名前情報を収集する
|
---|
23 | static void CollectClassesForNameOnly( const char *source, Classes &classes );
|
---|
24 |
|
---|
25 | // TypeDefを収集する
|
---|
26 | static void AddTypeDef( TypeDefCollection &typeDefs, const NamespaceScopes &namespaceScopes, const std::string &expression, int nowLine );
|
---|
27 | static void CollectTypeDefs( const char *source, TypeDefCollection &typeDefs );
|
---|
28 |
|
---|
29 | // 定数を収集する
|
---|
30 | static void AddConstEnum( Consts &consts, const NamespaceScopes &namespaceScopes, const char *buffer );
|
---|
31 | static void CollectConsts( const char *source, Consts &consts, ConstMacros &constMacros );
|
---|
32 | static bool ConstMacroToExpression( const ConstMacro &constMacro, const char *parameterStr, char *dest );
|
---|
33 |
|
---|
34 | // クラスを収集する
|
---|
35 | static Member *CreateMember( const CClass &_class, Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
|
---|
36 | static void AddMethod(CClass *pobj_c, UserProc *pUserProc, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
|
---|
37 | bool isVirtual, bool isOverride, const char *interfaceName, bool isAutoGeneration, int nowLine);
|
---|
38 | static bool Inherits( CClass &_class, const char *inheritNames, int nowLine );
|
---|
39 | static void Implements( CClass &_class, Interface *pInterface, std::vector<DynamicMethod::OverrideResult> &overrideResults );
|
---|
40 | static bool Implements( CClass &_class, const char *interfaceNames, int nowLine );
|
---|
41 | static void LookaheadClass( const std::string &className, Classes &classes );
|
---|
42 | static bool LoopRefCheck( const CClass &objClass );
|
---|
43 | static void CollectClasses( const char *source, Classes &classes );
|
---|
44 |
|
---|
45 | // テンプレート展開
|
---|
46 | static void TemplateExpand_ResolveMethod( const CMethod *pBaseMethod, const Types &actualTypes, CClass *pNewClass );
|
---|
47 | static const CClass *TemplateExpand( CClass &_class, const Types &actualTypes );
|
---|
48 |
|
---|
49 | // グローバルプロシージャを収集する
|
---|
50 | static bool ExtractParameterVarNames( const char *sourceOfParams, Jenga::Common::Strings ¶mVarNames, int nowLine );
|
---|
51 | static bool AnalyzeParameter( Parameters ¶ms, const Jenga::Common::Strings ¶meterStrings, int nowLine );
|
---|
52 | static bool SetParamsAndReturnTypeForUserProc( UserProc &userProc, const char *sourceOfParams, int nowLine, bool isStatic );
|
---|
53 | static bool SetParamsAndReturnType( Procedure *pProc, const char *sourceOfParams, bool isSupportEllipse, int nowLine );
|
---|
54 | static UserProc* ParseUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName = NULL );
|
---|
55 | static DllProc *ParseDllProc(const NamespaceScopes &namespaceScopes, char *buffer,int nowLine);
|
---|
56 | static void CollectProcedures( const char *source, UserProcs &userProcs, DllProcs &dllProcs );
|
---|
57 |
|
---|
58 | // デリゲートを収集する
|
---|
59 | static void CollectDelegates( const char *source, Delegates &delegates );
|
---|
60 | static std::string GenerateDelegatesSourceCode( const Delegates &delegates );
|
---|
61 | static void RefleshDelegateParameterAndReturnType( Delegate &dg );
|
---|
62 | static void RefleshDelegatesParameterAndReturnType( Delegates &delegates );
|
---|
63 | };
|
---|
64 |
|
---|
65 |
|
---|
66 | }}
|
---|