MCPcopy Create free account
hub / github.com/carbonengine/trinity / NewStruct

Function NewStruct

shadercompiler/ParserUtils.cpp:1043–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1041}
1042
1043ASTNode* NewStruct( ParserState& state, const InlineString& name )
1044{
1045 auto structDecl = state.NewNode( NT_STRUCT );
1046 auto symbol = state.GetSymbolTable().AddSymbol( name ? name : state.AllocateName() );
1047 symbol->isTypeName = true;
1048 symbol->definition = structDecl;
1049 structDecl->SetSymbol( symbol );
1050 structDecl->SetType( TypeFromSymbol( symbol ) );
1051 return structDecl;
1052}
1053
1054ASTNode* NewVarIdentifier( ParserState& state, Symbol* var )
1055{

Callers 2

PatchShaderFunction · 0.85
CreateGlobalInputsStructFunction · 0.85

Calls 6

TypeFromSymbolFunction · 0.85
NewNodeMethod · 0.80
AddSymbolMethod · 0.80
AllocateNameMethod · 0.80
SetSymbolMethod · 0.80
SetTypeMethod · 0.45

Tested by

no test coverage detected