Esempio n. 1
0
        private NamespaceId ParseNamespaceId()
        {
            var namespaceBuilder = new NamespaceIdBuilder();

            // there needs to be at least one name
            namespaceBuilder.AddNameSegment(MatchToken(MemberIdTokenKind.Name));

            // as long as there are more dots, consume more name segments
            while (TestAndMatchToken(MemberIdTokenKind.Dot))
            {
                namespaceBuilder.AddNameSegment(MatchToken(MemberIdTokenKind.Name));
            }

            // all tokens should be parsed now
            MatchToken(MemberIdTokenKind.Eof);

            return(namespaceBuilder.ToNamespaceId());
        }
Esempio n. 2
0
 private OuterTypeIdBuilder(NamespaceIdBuilder namespaceBuilder, string currentName)
 {
     m_NamespaceBuilder = namespaceBuilder;
     m_CurrentName      = currentName;
 }