コード例 #1
0
 public override void EnterElementModifier([NotNull] SBP.ElementModifierContext context)
 {
     if (m_modifiers == null)
     {
         m_modifiers = new List <string>();
     }
     m_modifiers.Add(context.GetText());
 }
コード例 #2
0
        public override void EnterElementModifier([NotNull] SBP.ElementModifierContext context)
        {
            var modifier = context.GetText();

            if (modifier == "public")
            {
                m_fileElementModifier = AccessModifier.Public;
            }
            else if (modifier == "private")
            {
                m_fileElementModifier = AccessModifier.Private;
            }
            else if (modifier == "protected")
            {
                m_fileElementModifier = AccessModifier.Protected;
            }
            else
            {
                throw new NotImplementedException();
            }
        }