MCPcopy Create free account
hub / github.com/alecazam/kram / Parse

Method Parse

hlslparser/src/HLSLParser.cpp:3936–3961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3934*/
3935
3936bool HLSLParser::Parse(HLSLTree* tree, const HLSLParserOptions& options)
3937{
3938 m_tree = tree;
3939 m_options = options;
3940
3941 HLSLRoot* root = m_tree->GetRoot();
3942 HLSLStatement* lastStatement = NULL;
3943
3944 while (!Accept(HLSLToken_EndOfStream)) {
3945 HLSLStatement* statement = NULL;
3946 if (!ParseTopLevel(statement)) {
3947 return false;
3948 }
3949 if (statement != NULL) {
3950 if (lastStatement == NULL) {
3951 root->statement = statement;
3952 }
3953 else {
3954 lastStatement->nextStatement = statement;
3955 }
3956 lastStatement = statement;
3957 while (lastStatement->nextStatement) lastStatement = lastStatement->nextStatement;
3958 }
3959 }
3960 return true;
3961}
3962
3963bool HLSLParser::AcceptTypeModifier(int& flags)
3964{

Callers 3

mainFunction · 0.80
ParseTrackEventArgsMethod · 0.80
TrackEventParserMethod · 0.80

Calls 1

GetRootMethod · 0.80

Tested by

no test coverage detected