This PR rewrites GLSLOperator to be clearer and easier to work with.
Notable changes:
GLSLOperator is no longer an enum but a hierarchy of classes - GLSLUnaryOperator, GLSLBinaryOperator and GLSLAssignmentOperator (special case for binary operator)
Those classes are further subclassed for each concrete operator type
Their instances are created and kept in GLSLOperators
New operators no longer attempt to create all possible input/output combinations, they can be queried instead (for example binary operator has boolean isValidInput(GLSLType, GLSLType) and similar method to get result type)
Added UnaryOperatorTypeAnnotation
(This could be merged immediately, but I want to document the reasoning for the changes somewhere and give time to others to review and/or prepare for the changes)
This builds on #77, that should be merged first.
This PR rewrites GLSLOperator to be clearer and easier to work with. Notable changes:
GLSLUnaryOperator
,GLSLBinaryOperator
andGLSLAssignmentOperator
(special case for binary operator)GLSLOperators
boolean isValidInput(GLSLType, GLSLType)
and similar method to get result type)(This could be merged immediately, but I want to document the reasoning for the changes somewhere and give time to others to review and/or prepare for the changes)