public override object VisitEnumDeclaration(UHeaderParser.EnumDeclarationContext context) { if (_ignoreOfPragma) { return(null); } var name = context.type()?.GetText(); if (string.IsNullOrEmpty(name)) { return(null); } _currentEnum = Get(context.type(), n => new Enum(n)); _currentEnum.SourceFile = _currentFile; _currentEnum.SourceLine = context.Start.Line; _currentEnum.UMeta = _currentUMeta ?? new Dictionary <string, string>(); _currentEnum.Description = _currentComment; _currentEnum.IsImplemented = true; _currentUMeta = null; _currentComment = ""; var body = context.enumElementList(); if (body != null) { VisitEnumElementList(body); } _currentEnum = null; return(null); }
public void Append(UHeaderParser.TranslationUnitContext translationunit, string file) { _preprocessorIfCount = 0; _ignoreOfAccessModifier = false; _ignoreOfPragma = false; _currentComment = ""; _currentFile = file; _currentDelegateVariable = null; _currentDelegate = null; _currentClass = null; _currentEnum = null; Visit(translationunit); }