Example #1
0
        private void CheckWithoutIdentifier(ReferenceName referenceName)
        {
            Assert.AreEqual("TestFiles.Parsing.ClassForReferencesTests.", referenceName.GetText());

            AssertChildsList(referenceName,
                             delegate(IElement obj)
                                 {
                                     ReferenceName @ref = (ReferenceName)obj;
                                     Check(@ref);
                                 },
                             delegate(IElement obj)
                                 {
                                     XmlToken token = (XmlToken)obj;
                                     Assert.AreEqual(".", token.GetText());
                                 });
        }
Example #2
0
        private TreeElement ParseReferencedName(TreeElement id)
        {
            TreeElement result = id;
            TokenNodeType tokenType = lexer.TokenType;
            XmlToken xmlToken = id as XmlToken;
            if (xmlToken != null && xmlToken.type == L4NTokenNodeType.IDENTIFIER)
            {
                result = new ReferenceName(id);
                // TODO parse argument list
            }

            while (tokenType == CSharpTokenType.DOT)
            {
            //                if (LexerUtil.LookaheadToken(lexer, 1) != CSharpTokenType.IDENTIFIER)
            //                {
            //                    UnexpectedToken ex = new UnexpectedToken("Expected identifier");
            //                    ex.ParsingResult = result;
            //                    throw ex;
            //                }
                result = ParseReferenceNameInternal(result);
                tokenType = lexer.TokenType;
            }
            return result;
        }