BinaryFileSchemaGUI.SchemaColorizer.ColorExpression C# (CSharp) Method

ColorExpression() private static method

private static ColorExpression ( BfsExpGroup group ) : void
group BFSchema.BfsExpGroup
return void
        private static void ColorExpression(BfsExpGroup group)
        {
            if (group == null)
                return;

            foreach (IBfsExpNode node in group.Members)
            {
                //Put nodes here that should have been replaced in the TypeLinking phase.
                //if (node is BfsUnresolvedVariableExp)
                    //throw new Exception("Unresolved variable expression detected!");

                if (node is BfsExpGroup)
                    ColorExpression(node as BfsExpGroup);
                else if (node is BfsBooleanExp)
                {
                    BfsBooleanExp exp = node as BfsBooleanExp;
                    ColorRange(exp.SourceRange, keywordcolor);
                }
                else if (node is BfsNumberExp)
                {
                    BfsNumberExp val = node as BfsNumberExp;
                    ColorRange(val.SourceRange, numbercolor);
                }
                else if (node is BfsOperator)
                {
                    //TODO
                }
                else if (node is BfsValueExp)
                {
                    BfsValueExp val = node as BfsValueExp;
                    ColorRange(val.SourceRange, keywordcolor);
                }
                else if (node is BfsEnumAliasExp)
                {
                    BfsEnumAliasExp val = node as BfsEnumAliasExp;
                    ColorRange(val.SourceRange, enumaliascolor);
                }
                else if (node is BfsCallExp)
                {
                    BfsCallExp val = node as BfsCallExp;
                    ColorRange(val.NameSourceRange, keywordcolor);
                    ColorRange(val.ArgumentSourceRange, typecolor);
                }
            }
        }