Exemplo n.º 1
0
void TSyntaxAnalyzer::CreateInternalClasses()
{
	TNameId name_id = lexer->GetIdFromName("dword");
	TClass* t_syntax = new TClass(base_class.get());
	base_class->AddNested(t_syntax);
	t_syntax->name = name_id;
	TSClass* t = new TSClass(sem_base_class.get(), t_syntax);
	t->SetSize(1);
	t->SetSignatureLinked();
	t->SetBodyLinked();
	sem_base_class->AddClass(t);
}
Exemplo n.º 2
0
	void CreateInternalClasses(Lexer::ILexer* lexer, SyntaxApi::IClass* base_class, SemanticApi::ISClass* _sbase_class)
	{
		lexer->ParseSource("class dword {}");
		SyntaxApi::IClass* t_syntax = SyntaxApi::AnalyzeNestedClass(lexer, base_class);

		auto sbase_class = dynamic_cast<TSClass*>(_sbase_class);
		TSClass* t = new TSClass(sbase_class, t_syntax);
		t->SetSize(1);
		t->SetSignatureLinked();
		t->SetBodyLinked();
		sbase_class->AddClass(t);
	}