9 #include "../runner/common/Setup.h"
23 const std::shared_ptr<SymbolFactory>& symbolFactory,
24 const std::shared_ptr<TypeDescriptorFactory>& typeDescriptorFactory,
25 const std::shared_ptr<StringPool>& stringPool);
48 std::shared_ptr<TypeDescriptor>
ResolveVariableSize(
const std::shared_ptr<SyntaxNode>& node);
56 void ResolveDeclarator(
const std::shared_ptr<SyntaxNode>& node,
const bool isStaticVariable);
76 std::shared_ptr<TypeDescriptor>
type;
82 [[nodiscard]] std::shared_ptr<Symbol>
Lookup(
const std::string_view name)
const;
84 bool IsConstTypeCompatible(
const std::shared_ptr<TypeDescriptor>& declaredType,
const std::shared_ptr<TypeDescriptor>& expressionType)
const;
85 std::shared_ptr<Symbol>
CreateConstSymbol(
const std::string_view name,
const std::shared_ptr<TypeDescriptor>& declaredType,
const ConstValue& value);
92 std::shared_ptr<SymbolFactory> mSymbolFactory;
93 std::shared_ptr<StringPool> mStringPool;
94 std::shared_ptr<TypeDescriptorFactory> mTypeDescriptorFactory;
Definition: SemanticAnalyzer.h:20
std::shared_ptr< Symbol > CreateConstSymbol(const std::string_view name, const std::shared_ptr< TypeDescriptor > &declaredType, const ConstValue &value)
Definition: SemanticAnalyzer.cpp:512
const std::shared_ptr< TypeDescriptorFactory > & GetTypeDescriptorFactory() const
Definition: SemanticAnalyzer.cpp:565
SemanticAnalyzer(const std::shared_ptr< SymbolFactory > &symbolFactory, const std::shared_ptr< TypeDescriptorFactory > &typeDescriptorFactory, const std::shared_ptr< StringPool > &stringPool)
Definition: SemanticAnalyzer.cpp:15
static void SetCurrentFileInformation(const std::shared_ptr< SyntaxNode > &node)
Definition: SemanticAnalyzer.cpp:25
void ResolveTypeDescription(const std::shared_ptr< SyntaxNode > &node)
Definition: SemanticAnalyzer.cpp:55
void ResolveDeclarator(const std::shared_ptr< SyntaxNode > &node, const bool isStaticVariable)
Definition: SemanticAnalyzer.cpp:74
std::shared_ptr< Symbol > Lookup(const std::string_view name) const
Definition: SemanticAnalyzer.cpp:177
static void ResolveTypeFromChildNode(const std::shared_ptr< SyntaxNode > &node)
Definition: SemanticAnalyzer.cpp:149
bool EvaluateConstExpression(const std::shared_ptr< SyntaxNode > &node, ConstValue &value)
Definition: SemanticAnalyzer.cpp:182
const std::shared_ptr< StringPool > & GetStringPool() const
Definition: SemanticAnalyzer.cpp:560
bool SearchSymbolFromName(const std::shared_ptr< SyntaxNode > &node)
Definition: SemanticAnalyzer.cpp:32
void ResolveVariableDescription(const std::shared_ptr< SyntaxNode > &node, const Symbol::MemoryTypeId memoryTypeId, const bool isStaticVariable)
Definition: SemanticAnalyzer.cpp:136
std::shared_ptr< TypeDescriptor > ResolveVariableSize(const std::shared_ptr< SyntaxNode > &node)
Definition: SemanticAnalyzer.cpp:94
virtual ~SemanticAnalyzer()=default
bool IsConstTypeCompatible(const std::shared_ptr< TypeDescriptor > &declaredType, const std::shared_ptr< TypeDescriptor > &expressionType) const
Definition: SemanticAnalyzer.cpp:500
const std::shared_ptr< SymbolFactory > & GetSymbolFactory() const
Definition: SemanticAnalyzer.cpp:555
MemoryTypeId
Definition: Symbol.h:62
Definition: CodeBuffer.cpp:12
Definition: Noncopyable.h:18
Definition: SemanticAnalyzer.h:75
float floatValue
Definition: SemanticAnalyzer.h:78
std::shared_ptr< TypeDescriptor > type
Definition: SemanticAnalyzer.h:76
std::string_view stringValue
Definition: SemanticAnalyzer.h:79
int32_t intValue
Definition: SemanticAnalyzer.h:77