From 05877ddcb5a4317a4067138f757fc0f98c4826e6 Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 22 Nov 2013 04:32:39 +0000 Subject: [PATCH] Converted enum items to be declarations in the AST. --- src/AST/Enumeration.cs | 9 ++++++--- src/CppParser/AST.h | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/AST/Enumeration.cs b/src/AST/Enumeration.cs index 8d0fd59a..55137878 100644 --- a/src/AST/Enumeration.cs +++ b/src/AST/Enumeration.cs @@ -19,12 +19,10 @@ namespace CppSharp.AST /// /// Represents a C/C++ enumeration item. /// - public class Item : INamedDecl + public class Item : Declaration { - public string Name { get; set; } public ulong Value; public string Expression; - public string Comment; public bool ExplicitValue = true; public bool IsHexadecimal @@ -38,6 +36,11 @@ namespace CppSharp.AST return Expression.Contains("0x") || Expression.Contains("0X"); } } + + public override T Visit(IDeclVisitor visitor) + { + throw new NotImplementedException(); + } } public Enumeration() diff --git a/src/CppParser/AST.h b/src/CppParser/AST.h index 0a239ea2..93ece23a 100644 --- a/src/CppParser/AST.h +++ b/src/CppParser/AST.h @@ -473,7 +473,6 @@ struct CS_API Enumeration : public Declaration struct CS_API Item : public Declaration { std::string Expression; - std::string Comment; uint64_t Value; };