Closed seivan closed 5 years ago
Yes, a CompoundStatement
is always surrounded by braces. Currently, there’s no such parser for what you’re asking. Either you want to break, as you mention, the lines or you need to add the braces if you want to use CompoundStatement
.
Besides that, what’s it you want to do? :)
No, that’s perfect. I just wanted to make sure I was understanding correctly, it works alright for me.
I want to join existing partial glsl code with one that's built programatically.
I'm then adding it to an existing
CompoundStatement
that has programatically built everything else.The issue, the
CompoundStatement::parse()
fails unless the string is surrounded with{}
. MaybeCompoundStatement
is the wrong type, in which case could you direct me to the correct type for parsing existing code that could be within a function (e.g no declarations).I tested
Statement
andExpr
but those seem to be for one liners and I'd have to separate each line into its own string before parsing?