Browse Source

Converted enum items to be declarations in the AST.

pull/123/head
triton 12 years ago
parent
commit
05877ddcb5
  1. 9
      src/AST/Enumeration.cs
  2. 1
      src/CppParser/AST.h

9
src/AST/Enumeration.cs

@ -19,12 +19,10 @@ namespace CppSharp.AST @@ -19,12 +19,10 @@ namespace CppSharp.AST
/// <summary>
/// Represents a C/C++ enumeration item.
/// </summary>
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 @@ -38,6 +36,11 @@ namespace CppSharp.AST
return Expression.Contains("0x") || Expression.Contains("0X");
}
}
public override T Visit<T>(IDeclVisitor<T> visitor)
{
throw new NotImplementedException();
}
}
public Enumeration()

1
src/CppParser/AST.h

@ -473,7 +473,6 @@ struct CS_API Enumeration : public Declaration @@ -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;
};

Loading…
Cancel
Save