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

Function NewLiteralConst

shadercompiler/ParserUtils.cpp:1062–1068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060}
1061
1062ASTNode* NewLiteralConst( ParserState& state, float value )
1063{
1064 ScannerToken token = { OP_FLOAT, 0, state.AllocateName( std::to_string( value ).c_str() ), {} };
1065 auto result = state.NewNode( NT_CONSTANT, token );
1066 result->SetType( TypeFromTokenType( OP_FLOAT ) );
1067 return result;
1068}
1069
1070ASTNode* NewLiteralConst( ParserState& state, uint32_t value )
1071{

Callers 1

PatchRtShaderFunction · 0.85

Calls 6

to_stringFunction · 0.85
TypeFromTokenTypeFunction · 0.85
MakeInlineStringFunction · 0.85
AllocateNameMethod · 0.80
NewNodeMethod · 0.80
SetTypeMethod · 0.45

Tested by

no test coverage detected