/// <summary> /// Check for unrecognized token /// </summary> private void CheckTokenValid() { TypeDeclaration d = declaration; if (!AccessModifier.IsValid(d.accessModifier)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.accessModifier)); } if (!OtherKeywords.IsValid(d.staticToken)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.staticToken)); } if (!Inheritance.IsValid(d.inheritance)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.inheritance)); } if (!OtherKeywords.IsValid(d.partialToken)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.partialToken)); } if (!Scope.IsValid(d.scope)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.scope)); } }
/// <summary> /// Check for unrecognized token /// </summary> private void CheckTokenValid() { MemberDeclaration d = declaration; if (!AccessModifier.IsValid(d.accessModifier)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.accessModifier)); } if (d.inheritance.Equals(Inheritance.SEALED)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.inheritance)); } if (!d.scope.Equals(Scope.METHOD) && !d.scope.Equals(Scope.PROPERTY)) { throw new ArgumentException(string.Format("Invalid token '{0}'", d.scope)); } }