public override TreeElement ParseErrorElement()
        {
            // NOTE: Doesn't Advance
            var result = TreeElementFactory.CreateErrorElement(ParserMessages.GetUnexpectedTokenMessage());

            return(result);
        }
        public override void ParseErrorTexturePropertyBlockValues(CompositeElement result)
        {
            // Parse anything with the `{ }` of a texture property block
            if (myOriginalLexer.TokenType == ShaderLabTokenType.RBRACE)
            {
                return;
            }

            var errorElement = TreeElementFactory.CreateErrorElement(ParserMessages.GetUnexpectedTokenMessage());

            while (myOriginalLexer.TokenType != ShaderLabTokenType.RBRACE)
            {
                Skip(errorElement);
            }
            result.AppendNewChild(errorElement);
        }
        public override TreeElement ParseErrorPropertyValue()
        {
            var result = TreeElementFactory.CreateErrorElement(ParserMessages.GetUnexpectedTokenMessage());

            // Consume until we hit either an identifier (start of another property)
            // an LBRACK (start of attributes for another property) or RBRACE
            while (!IsIdentifier(myOriginalLexer.TokenType) &&
                   myOriginalLexer.TokenType != ShaderLabTokenType.LBRACK &&
                   myOriginalLexer.TokenType != ShaderLabTokenType.RBRACE)
            {
                if (myOriginalLexer.TokenType == ShaderLabTokenType.LBRACE)
                {
                    SkipNestedBraces(result);
                }
                else
                {
                    Skip(result);
                }
            }
            return(result);
        }