/// <summary> /// Parses the inherits statement. /// </summary> protected override bool InheritsStatement() { // Verify we're on the right keyword and accept Assert(VBKeyword.Inherits); VBSymbol inherits = CurrentSymbol; NextToken(); _endInheritsLocation = CurrentLocation; PutCurrentBack(); PutBack(inherits); EnsureCurrent(); bool result = base.InheritsStatement(); CheckForInheritsAndModelStatements(); return(result); }
public void IsVBSymbolTest() { // // Using reflection, verify that all symbol constants are determined // to be symbols. // FieldInfo[] symbolFields = typeof(VBSymbol).GetFields( BindingFlags.Static | BindingFlags.Public); foreach (FieldInfo symbolField in symbolFields) { if (symbolField.FieldType == typeof(char)) { char fieldValue = (char)symbolField.GetValue(null); Assert.IsTrue(VBSymbol.IsVBSymbol(fieldValue), "Field value should be considered a VB symbol."); } } Assert.IsFalse(VBSymbol.IsVBSymbol('1')); Assert.IsFalse(VBSymbol.IsVBSymbol('A')); Assert.IsFalse(VBSymbol.IsVBSymbol('$')); Assert.IsFalse(VBSymbol.IsVBSymbol('*')); }