コード例 #1
0
        private bool AdvanceOverWhitespace()
        {
            bool flag = true;

            while (!IsAtEndOfInput && XamlParseUtils.IsWhitespaceChar(CurrentChar))
            {
                flag = true;
                Advance();
            }

            return(flag);
        }
コード例 #2
0
        private void State_InName()
        {
            if ((IsAtEndOfInput || XamlParseUtils.IsWhitespaceChar(CurrentChar)) || (CurrentChar == '['))
            {
                _token = XamlTypeNameLexerToken.NAME;
                _state = State.START;
            }
            else
            {
                switch (CurrentChar)
                {
                case '(':
                    _pushedBackSymbol = XamlTypeNameLexerToken.ROUND_BRACKET_OPEN;
                    _token            = XamlTypeNameLexerToken.NAME;
                    _state            = State.START;
                    break;

                case ')':
                    _pushedBackSymbol = XamlTypeNameLexerToken.ROUND_BRACKET_CLOSE;
                    _token            = XamlTypeNameLexerToken.NAME;
                    _state            = State.START;
                    break;

                case ',':
                    _pushedBackSymbol = XamlTypeNameLexerToken.COMMA;
                    _token            = XamlTypeNameLexerToken.NAME;
                    _state            = State.START;
                    break;

                case ':':
                    _pushedBackSymbol = XamlTypeNameLexerToken.COLON;
                    _token            = XamlTypeNameLexerToken.NAME;
                    _state            = State.START;
                    break;

                default:
                    if (XamlParseUtils.IsValidQualifiedNameChar(CurrentChar))
                    {
                        AddToMultiCharToken();
                    }
                    else
                    {
                        _token = XamlTypeNameLexerToken.ERROR;
                    }
                    break;
                }

                _lastChar = CurrentChar;
                Advance();
            }
        }