Browse Source

Restored support for full comments.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/526/head
Dimitar Dobrev 10 years ago
parent
commit
cd3e729d38
  1. 4
      src/AST/Comment.cs
  2. 167
      src/Core/Parser/ASTConverter.cs
  3. 74
      src/CppParser/AST.cpp
  4. 151
      src/CppParser/AST.h
  5. 900
      src/CppParser/Bindings/CLI/AST.cpp
  6. 422
      src/CppParser/Bindings/CLI/AST.h
  7. 8
      src/CppParser/Bindings/CLI/CppParser.cpp
  8. 2
      src/CppParser/Bindings/CLI/Sources.cpp
  9. 2
      src/CppParser/Bindings/CLI/Target.cpp
  10. 2371
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  11. 11
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs
  12. 2371
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  13. 11
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs
  14. 2371
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  15. 11
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs
  16. 2371
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
  17. 11
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs
  18. 72
      src/CppParser/Comments.cpp

4
src/AST/Comment.cs

@ -355,7 +355,7 @@ namespace CppSharp.AST @@ -355,7 +355,7 @@ namespace CppSharp.AST
/// <summary>
/// A command with word-like arguments that is considered inline content.
/// </summary>
public class InlineCommandComment : Comment
public class InlineCommandComment : InlineContentComment
{
public struct Argument
{
@ -388,7 +388,7 @@ namespace CppSharp.AST @@ -388,7 +388,7 @@ namespace CppSharp.AST
/// <summary>
/// A line of text contained in a verbatim block.
/// </summary>
public class VerbatimBlockLineComment : BlockCommandComment
public class VerbatimBlockLineComment : Comment
{
public string Text;

167
src/Core/Parser/ASTConverter.cs

@ -254,15 +254,56 @@ namespace CppSharp @@ -254,15 +254,56 @@ namespace CppSharp
{
public abstract TRet VisitFullComment(FullComment comment);
public virtual TRet Visit(Parser.AST.Comment comment)
protected abstract TRet VisitBlockCommandComment(BlockCommandComment comment);
protected abstract TRet VisitParamCommandComment(ParamCommandComment comment);
protected abstract TRet VisitTParamCommandComment(TParamCommandComment comment);
protected abstract TRet VisitVerbatimBlockComment(VerbatimBlockComment comment);
protected abstract TRet VisitVerbatimLineComment(VerbatimLineComment comment);
protected abstract TRet VisitParagraphComment(ParagraphComment comment);
protected abstract TRet VisitHTMLStartTagComment(HTMLStartTagComment comment);
protected abstract TRet VisitHTMLEndTagComment(HTMLEndTagComment comment);
protected abstract TRet VisitTextComment(TextComment comment);
protected abstract TRet VisitInlineCommandComment(InlineCommandComment comment);
protected abstract TRet VisitVerbatimBlockLineComment(VerbatimBlockLineComment comment);
public virtual TRet Visit(Comment comment)
{
switch (comment.Kind)
{
case CommentKind.FullComment:
{
var _comment = FullComment.__CreateInstance(comment.__Instance);
return VisitFullComment(_comment);
}
return VisitFullComment(FullComment.__CreateInstance(comment.__Instance));
case CommentKind.BlockCommandComment:
return VisitBlockCommandComment(BlockCommandComment.__CreateInstance(comment.__Instance));
case CommentKind.ParamCommandComment:
return VisitParamCommandComment(ParamCommandComment.__CreateInstance(comment.__Instance));
case CommentKind.TParamCommandComment:
return VisitTParamCommandComment(TParamCommandComment.__CreateInstance(comment.__Instance));
case CommentKind.VerbatimBlockComment:
return VisitVerbatimBlockComment(VerbatimBlockComment.__CreateInstance(comment.__Instance));
case CommentKind.VerbatimLineComment:
return VisitVerbatimLineComment(VerbatimLineComment.__CreateInstance(comment.__Instance));
case CommentKind.ParagraphComment:
return VisitParagraphComment(ParagraphComment.__CreateInstance(comment.__Instance));
case CommentKind.HTMLStartTagComment:
return VisitHTMLStartTagComment(HTMLStartTagComment.__CreateInstance(comment.__Instance));
case CommentKind.HTMLEndTagComment:
return VisitHTMLEndTagComment(HTMLEndTagComment.__CreateInstance(comment.__Instance));
case CommentKind.TextComment:
return VisitTextComment(TextComment.__CreateInstance(comment.__Instance));
case CommentKind.InlineCommandComment:
return VisitInlineCommandComment(InlineCommandComment.__CreateInstance(comment.__Instance));
case CommentKind.VerbatimBlockLineComment:
return VisitVerbatimBlockLineComment(VerbatimBlockLineComment.__CreateInstance(comment.__Instance));
}
throw new ArgumentOutOfRangeException();
@ -1542,7 +1583,121 @@ namespace CppSharp @@ -1542,7 +1583,121 @@ namespace CppSharp
{
public override AST.Comment VisitFullComment(FullComment comment)
{
throw new NotImplementedException();
var fullComment = new AST.FullComment();
for (uint i = 0; i < comment.BlocksCount; i++)
fullComment.Blocks.Add((AST.BlockContentComment) Visit(comment.getBlocks(i)));
return fullComment;
}
protected override AST.Comment VisitBlockCommandComment(BlockCommandComment comment)
{
var blockCommandComment = new AST.BlockCommandComment();
VisitBlockCommandComment(blockCommandComment, comment);
return blockCommandComment;
}
protected override AST.Comment VisitParamCommandComment(ParamCommandComment comment)
{
var paramCommandComment = new AST.ParamCommandComment();
switch (comment.Direction)
{
case ParamCommandComment.PassDirection.In:
paramCommandComment.Direction = AST.ParamCommandComment.PassDirection.In;
break;
case ParamCommandComment.PassDirection.Out:
paramCommandComment.Direction = AST.ParamCommandComment.PassDirection.Out;
break;
case ParamCommandComment.PassDirection.InOut:
paramCommandComment.Direction = AST.ParamCommandComment.PassDirection.InOut;
break;
}
paramCommandComment.ParamIndex = comment.ParamIndex;
return paramCommandComment;
}
protected override AST.Comment VisitTParamCommandComment(TParamCommandComment comment)
{
var paramCommandComment = new AST.TParamCommandComment();
for (uint i = 0; i < comment.PositionCount; i++)
paramCommandComment.Position.Add(comment.getPosition(i));
VisitBlockCommandComment(paramCommandComment, comment);
return paramCommandComment;
}
protected override AST.Comment VisitVerbatimBlockComment(VerbatimBlockComment comment)
{
var verbatimBlockComment = new AST.VerbatimBlockComment();
for (uint i = 0; i < comment.LinesCount; i++)
verbatimBlockComment.Lines.Add((AST.VerbatimBlockLineComment) Visit(comment.getLines(i)));
VisitBlockCommandComment(verbatimBlockComment, comment);
return verbatimBlockComment;
}
protected override AST.Comment VisitVerbatimLineComment(VerbatimLineComment comment)
{
var verbatimLineComment = new AST.VerbatimLineComment { Text = comment.Text };
VisitBlockCommandComment(verbatimLineComment, comment);
return verbatimLineComment;
}
protected override AST.Comment VisitParagraphComment(ParagraphComment comment)
{
var paragraphComment = new AST.ParagraphComment();
for (uint i = 0; i < comment.ContentCount; i++)
paragraphComment.Content.Add((AST.InlineContentComment) Visit(comment.getContent(i)));
paragraphComment.IsWhitespace = comment.IsWhitespace;
return paragraphComment;
}
protected override AST.Comment VisitHTMLStartTagComment(HTMLStartTagComment comment)
{
var htmlStartTagComment = new AST.HTMLStartTagComment();
for (uint i = 0; i < comment.AttributesCount; i++)
{
var attribute = new AST.HTMLStartTagComment.Attribute();
var _attribute = comment.getAttributes(i);
attribute.Name = _attribute.Name;
attribute.Value = _attribute.Value;
htmlStartTagComment.Attributes.Add(attribute);
}
htmlStartTagComment.TagName = comment.TagName;
return htmlStartTagComment;
}
protected override AST.Comment VisitHTMLEndTagComment(HTMLEndTagComment comment)
{
return new AST.HTMLEndTagComment { TagName = comment.TagName };
}
protected override AST.Comment VisitTextComment(TextComment comment)
{
return new AST.TextComment { Text = comment.Text };
}
protected override AST.Comment VisitInlineCommandComment(InlineCommandComment comment)
{
var inlineCommandComment = new AST.InlineCommandComment();
for (uint i = 0; i < comment.ArgumentsCount; i++)
{
var argument = new AST.InlineCommandComment.Argument { Text = comment.getArguments(i).Text };
inlineCommandComment.Arguments.Add(argument);
}
return inlineCommandComment;
}
protected override AST.Comment VisitVerbatimBlockLineComment(VerbatimBlockLineComment comment)
{
return new AST.VerbatimBlockLineComment { Text = comment.Text };
}
private static void VisitBlockCommandComment(AST.BlockCommandComment blockCommandComment, BlockCommandComment comment)
{
blockCommandComment.CommandId = comment.CommandId;
for (uint i = 0; i < comment.ArgumentsCount; i++)
{
var argument = new AST.BlockCommandComment.Argument { Text = comment.getArguments(i).Text };
blockCommandComment.Arguments.Add(argument);
}
}
}

74
src/CppParser/AST.cpp

@ -701,4 +701,78 @@ RawComment::RawComment() : FullCommentBlock(0) {} @@ -701,4 +701,78 @@ RawComment::RawComment() : FullCommentBlock(0) {}
FullComment::FullComment() : Comment(CommentKind::FullComment) {}
DEF_VECTOR(FullComment, BlockContentComment*, Blocks)
BlockContentComment::BlockContentComment() : Comment(CommentKind::BlockContentComment) {}
BlockContentComment::BlockContentComment(CommentKind Kind) : Comment(Kind) {}
BlockCommandComment::Argument::Argument() {}
DEF_STRING(BlockCommandComment::Argument, Text)
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), CommandId(0) {}
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind) {}
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments)
ParamCommandComment::ParamCommandComment() : BlockCommandComment(CommentKind::ParamCommandComment), Direction(PassDirection::In), ParamIndex(0) {}
TParamCommandComment::TParamCommandComment() : BlockCommandComment(CommentKind::TParamCommandComment) {}
DEF_VECTOR(TParamCommandComment, unsigned, Position)
VerbatimBlockComment::VerbatimBlockComment() : BlockCommandComment(CommentKind::VerbatimBlockComment) {}
DEF_VECTOR(VerbatimBlockComment, VerbatimBlockLineComment*, Lines)
VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::VerbatimLineComment) {}
DEF_STRING(VerbatimLineComment, Text)
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), IsWhitespace(false) {}
DEF_VECTOR(ParagraphComment, InlineContentComment*, Content)
HTMLTagComment::HTMLTagComment() : InlineContentComment(CommentKind::HTMLTagComment) {}
HTMLTagComment::HTMLTagComment(CommentKind Kind) : InlineContentComment(Kind) {}
HTMLStartTagComment::Attribute::Attribute() {}
DEF_STRING(HTMLStartTagComment::Attribute, Name)
DEF_STRING(HTMLStartTagComment::Attribute, Value)
HTMLStartTagComment::HTMLStartTagComment() : HTMLTagComment(CommentKind::HTMLStartTagComment) {}
DEF_VECTOR(HTMLStartTagComment, HTMLStartTagComment::Attribute, Attributes)
DEF_STRING(HTMLStartTagComment, TagName)
HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagComment) {}
DEF_STRING(HTMLEndTagComment, TagName)
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment) {}
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind) {}
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {}
DEF_STRING(TextComment, Text)
InlineCommandComment::Argument::Argument() {}
DEF_STRING(InlineCommandComment::Argument, Text)
InlineCommandComment::InlineCommandComment() : InlineContentComment(CommentKind::InlineCommandComment), CommentRenderKind(RenderNormal) {}
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments)
VerbatimBlockLineComment::VerbatimBlockLineComment() : Comment(CommentKind::VerbatimBlockLineComment) {}
DEF_STRING(VerbatimBlockLineComment, Text)
} } }

151
src/CppParser/AST.h

@ -863,6 +863,20 @@ public: @@ -863,6 +863,20 @@ public:
enum struct CommentKind
{
FullComment,
BlockContentComment,
BlockCommandComment,
ParamCommandComment,
TParamCommandComment,
VerbatimBlockComment,
VerbatimLineComment,
ParagraphComment,
HTMLTagComment,
HTMLStartTagComment,
HTMLEndTagComment,
TextComment,
InlineContentComment,
InlineCommandComment,
VerbatimBlockLineComment
};
class CS_API CS_ABSTRACT Comment
@ -872,10 +886,147 @@ public: @@ -872,10 +886,147 @@ public:
CommentKind Kind;
};
class CS_API BlockContentComment : public Comment
{
public:
BlockContentComment();
BlockContentComment(CommentKind Kind);
};
class CS_API FullComment : public Comment
{
public:
FullComment();
VECTOR(BlockContentComment*, Blocks)
};
class CS_API BlockCommandComment : public BlockContentComment
{
public:
class CS_API Argument
{
public:
Argument();
STRING(Text)
};
BlockCommandComment();
BlockCommandComment(CommentKind Kind);
unsigned CommandId;
VECTOR(Argument, Arguments)
};
class CS_API ParamCommandComment : public BlockCommandComment
{
public:
enum PassDirection
{
In,
Out,
InOut
};
ParamCommandComment();
PassDirection Direction;
unsigned ParamIndex;
};
class CS_API TParamCommandComment : public BlockCommandComment
{
public:
TParamCommandComment();
VECTOR(unsigned, Position)
};
class CS_API VerbatimBlockLineComment : public Comment
{
public:
VerbatimBlockLineComment();
STRING(Text)
};
class CS_API VerbatimBlockComment : public BlockCommandComment
{
public:
VerbatimBlockComment();
VECTOR(VerbatimBlockLineComment*, Lines)
};
class CS_API VerbatimLineComment : public BlockCommandComment
{
public:
VerbatimLineComment();
STRING(Text)
};
class CS_API InlineContentComment : public Comment
{
public:
InlineContentComment();
InlineContentComment(CommentKind Kind);
};
class CS_API ParagraphComment : public BlockContentComment
{
public:
ParagraphComment();
bool IsWhitespace;
VECTOR(InlineContentComment*, Content)
};
class CS_API InlineCommandComment : public InlineContentComment
{
public:
enum RenderKind
{
RenderNormal,
RenderBold,
RenderMonospaced,
RenderEmphasized
};
class CS_API Argument
{
public:
Argument();
STRING(Text)
};
InlineCommandComment();
RenderKind CommentRenderKind;
VECTOR(Argument, Arguments)
};
class CS_API HTMLTagComment : public InlineContentComment
{
public:
HTMLTagComment();
HTMLTagComment(CommentKind Kind);
};
class CS_API HTMLStartTagComment : public HTMLTagComment
{
public:
class CS_API Attribute
{
public:
Attribute();
STRING(Name)
STRING(Value)
};
HTMLStartTagComment();
STRING(TagName)
VECTOR(Attribute, Attributes)
};
class CS_API HTMLEndTagComment : public HTMLTagComment
{
public:
HTMLEndTagComment();
STRING(TagName)
};
class CS_API TextComment : public InlineContentComment
{
public:
TextComment();
STRING(Text)
};
enum class RawCommentKind

900
src/CppParser/Bindings/CLI/AST.cpp

File diff suppressed because it is too large Load Diff

422
src/CppParser/Bindings/CLI/AST.h

@ -31,6 +31,8 @@ namespace CppSharp @@ -31,6 +31,8 @@ namespace CppSharp
ref class AttributedType;
ref class BaseClassSpecifier;
ref class BinaryOperator;
ref class BlockCommandComment;
ref class BlockContentComment;
ref class BuiltinType;
ref class Class;
ref class ClassLayout;
@ -51,7 +53,12 @@ namespace CppSharp @@ -51,7 +53,12 @@ namespace CppSharp
ref class FunctionTemplate;
ref class FunctionTemplateSpecialization;
ref class FunctionType;
ref class HTMLEndTagComment;
ref class HTMLStartTagComment;
ref class HTMLTagComment;
ref class InjectedClassNameType;
ref class InlineCommandComment;
ref class InlineContentComment;
ref class MacroDefinition;
ref class MacroExpansion;
ref class MemberPointerType;
@ -59,12 +66,15 @@ namespace CppSharp @@ -59,12 +66,15 @@ namespace CppSharp
ref class Namespace;
ref class NativeLibrary;
ref class PackExpansionType;
ref class ParagraphComment;
ref class ParamCommandComment;
ref class Parameter;
ref class PointerType;
ref class PreprocessedEntity;
ref class QualifiedType;
ref class RawComment;
ref class Statement;
ref class TParamCommandComment;
ref class TagType;
ref class Template;
ref class TemplateArgument;
@ -72,6 +82,7 @@ namespace CppSharp @@ -72,6 +82,7 @@ namespace CppSharp
ref class TemplateParameterSubstitutionType;
ref class TemplateParameterType;
ref class TemplateSpecializationType;
ref class TextComment;
ref class TranslationUnit;
ref class Type;
ref class TypeQualifiers;
@ -81,6 +92,9 @@ namespace CppSharp @@ -81,6 +92,9 @@ namespace CppSharp
ref class VTableComponent;
ref class VTableLayout;
ref class Variable;
ref class VerbatimBlockComment;
ref class VerbatimBlockLineComment;
ref class VerbatimLineComment;
}
}
}
@ -287,7 +301,21 @@ namespace CppSharp @@ -287,7 +301,21 @@ namespace CppSharp
public enum struct CommentKind
{
FullComment = 0
FullComment = 0,
BlockContentComment = 1,
BlockCommandComment = 2,
ParamCommandComment = 3,
TParamCommandComment = 4,
VerbatimBlockComment = 5,
VerbatimLineComment = 6,
ParagraphComment = 7,
HTMLTagComment = 8,
HTMLStartTagComment = 9,
HTMLEndTagComment = 10,
TextComment = 11,
InlineContentComment = 12,
InlineCommandComment = 13,
VerbatimBlockLineComment = 14
};
public enum struct MacroLocation
@ -2250,6 +2278,19 @@ namespace CppSharp @@ -2250,6 +2278,19 @@ namespace CppSharp
}
};
public ref class BlockContentComment : CppSharp::Parser::AST::Comment
{
public:
BlockContentComment(::CppSharp::CppParser::AST::BlockContentComment* native);
static BlockContentComment^ __CreateInstance(::System::IntPtr native);
BlockContentComment();
BlockContentComment(CppSharp::Parser::AST::CommentKind Kind);
BlockContentComment(CppSharp::Parser::AST::BlockContentComment^ _0);
};
public ref class FullComment : CppSharp::Parser::AST::Comment
{
public:
@ -2259,6 +2300,385 @@ namespace CppSharp @@ -2259,6 +2300,385 @@ namespace CppSharp
FullComment();
FullComment(CppSharp::Parser::AST::FullComment^ _0);
property unsigned int BlocksCount
{
unsigned int get();
}
CppSharp::Parser::AST::BlockContentComment^ getBlocks(unsigned int i);
void addBlocks(CppSharp::Parser::AST::BlockContentComment^ s);
void clearBlocks();
};
public ref class BlockCommandComment : CppSharp::Parser::AST::BlockContentComment
{
public:
ref class Argument : ICppInstance
{
public:
property ::CppSharp::CppParser::AST::BlockCommandComment::Argument* NativePtr;
property System::IntPtr __Instance
{
virtual System::IntPtr get();
virtual void set(System::IntPtr instance);
}
Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native);
static Argument^ __CreateInstance(::System::IntPtr native);
Argument();
Argument(CppSharp::Parser::AST::BlockCommandComment::Argument^ _0);
property System::String^ Text
{
System::String^ get();
void set(System::String^);
}
};
BlockCommandComment(::CppSharp::CppParser::AST::BlockCommandComment* native);
static BlockCommandComment^ __CreateInstance(::System::IntPtr native);
BlockCommandComment();
BlockCommandComment(CppSharp::Parser::AST::CommentKind Kind);
BlockCommandComment(CppSharp::Parser::AST::BlockCommandComment^ _0);
property unsigned int ArgumentsCount
{
unsigned int get();
}
property unsigned int CommandId
{
unsigned int get();
void set(unsigned int);
}
CppSharp::Parser::AST::BlockCommandComment::Argument^ getArguments(unsigned int i);
void addArguments(CppSharp::Parser::AST::BlockCommandComment::Argument^ s);
void clearArguments();
};
public ref class ParamCommandComment : CppSharp::Parser::AST::BlockCommandComment
{
public:
enum struct PassDirection
{
In = 0,
Out = 1,
InOut = 2
};
ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native);
static ParamCommandComment^ __CreateInstance(::System::IntPtr native);
ParamCommandComment();
ParamCommandComment(CppSharp::Parser::AST::ParamCommandComment^ _0);
property CppSharp::Parser::AST::ParamCommandComment::PassDirection Direction
{
CppSharp::Parser::AST::ParamCommandComment::PassDirection get();
void set(CppSharp::Parser::AST::ParamCommandComment::PassDirection);
}
property unsigned int ParamIndex
{
unsigned int get();
void set(unsigned int);
}
};
public ref class TParamCommandComment : CppSharp::Parser::AST::BlockCommandComment
{
public:
TParamCommandComment(::CppSharp::CppParser::AST::TParamCommandComment* native);
static TParamCommandComment^ __CreateInstance(::System::IntPtr native);
TParamCommandComment();
TParamCommandComment(CppSharp::Parser::AST::TParamCommandComment^ _0);
property unsigned int PositionCount
{
unsigned int get();
}
unsigned int getPosition(unsigned int i);
void addPosition(unsigned int* s);
void clearPosition();
};
public ref class VerbatimBlockLineComment : CppSharp::Parser::AST::Comment
{
public:
VerbatimBlockLineComment(::CppSharp::CppParser::AST::VerbatimBlockLineComment* native);
static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native);
VerbatimBlockLineComment();
VerbatimBlockLineComment(CppSharp::Parser::AST::VerbatimBlockLineComment^ _0);
property System::String^ Text
{
System::String^ get();
void set(System::String^);
}
};
public ref class VerbatimBlockComment : CppSharp::Parser::AST::BlockCommandComment
{
public:
VerbatimBlockComment(::CppSharp::CppParser::AST::VerbatimBlockComment* native);
static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native);
VerbatimBlockComment();
VerbatimBlockComment(CppSharp::Parser::AST::VerbatimBlockComment^ _0);
property unsigned int LinesCount
{
unsigned int get();
}
CppSharp::Parser::AST::VerbatimBlockLineComment^ getLines(unsigned int i);
void addLines(CppSharp::Parser::AST::VerbatimBlockLineComment^ s);
void clearLines();
};
public ref class VerbatimLineComment : CppSharp::Parser::AST::BlockCommandComment
{
public:
VerbatimLineComment(::CppSharp::CppParser::AST::VerbatimLineComment* native);
static VerbatimLineComment^ __CreateInstance(::System::IntPtr native);
VerbatimLineComment();
VerbatimLineComment(CppSharp::Parser::AST::VerbatimLineComment^ _0);
property System::String^ Text
{
System::String^ get();
void set(System::String^);
}
};
public ref class InlineContentComment : CppSharp::Parser::AST::Comment
{
public:
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native);
static InlineContentComment^ __CreateInstance(::System::IntPtr native);
InlineContentComment();
InlineContentComment(CppSharp::Parser::AST::CommentKind Kind);
InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0);
};
public ref class ParagraphComment : CppSharp::Parser::AST::BlockContentComment
{
public:
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native);
static ParagraphComment^ __CreateInstance(::System::IntPtr native);
ParagraphComment();
ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0);
property unsigned int ContentCount
{
unsigned int get();
}
property bool IsWhitespace
{
bool get();
void set(bool);
}
CppSharp::Parser::AST::InlineContentComment^ getContent(unsigned int i);
void addContent(CppSharp::Parser::AST::InlineContentComment^ s);
void clearContent();
};
public ref class InlineCommandComment : CppSharp::Parser::AST::InlineContentComment
{
public:
enum struct RenderKind
{
RenderNormal = 0,
RenderBold = 1,
RenderMonospaced = 2,
RenderEmphasized = 3
};
ref class Argument : ICppInstance
{
public:
property ::CppSharp::CppParser::AST::InlineCommandComment::Argument* NativePtr;
property System::IntPtr __Instance
{
virtual System::IntPtr get();
virtual void set(System::IntPtr instance);
}
Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native);
static Argument^ __CreateInstance(::System::IntPtr native);
Argument();
Argument(CppSharp::Parser::AST::InlineCommandComment::Argument^ _0);
property System::String^ Text
{
System::String^ get();
void set(System::String^);
}
};
InlineCommandComment(::CppSharp::CppParser::AST::InlineCommandComment* native);
static InlineCommandComment^ __CreateInstance(::System::IntPtr native);
InlineCommandComment();
InlineCommandComment(CppSharp::Parser::AST::InlineCommandComment^ _0);
property unsigned int ArgumentsCount
{
unsigned int get();
}
property CppSharp::Parser::AST::InlineCommandComment::RenderKind CommentRenderKind
{
CppSharp::Parser::AST::InlineCommandComment::RenderKind get();
void set(CppSharp::Parser::AST::InlineCommandComment::RenderKind);
}
CppSharp::Parser::AST::InlineCommandComment::Argument^ getArguments(unsigned int i);
void addArguments(CppSharp::Parser::AST::InlineCommandComment::Argument^ s);
void clearArguments();
};
public ref class HTMLTagComment : CppSharp::Parser::AST::InlineContentComment
{
public:
HTMLTagComment(::CppSharp::CppParser::AST::HTMLTagComment* native);
static HTMLTagComment^ __CreateInstance(::System::IntPtr native);
HTMLTagComment();
HTMLTagComment(CppSharp::Parser::AST::CommentKind Kind);
HTMLTagComment(CppSharp::Parser::AST::HTMLTagComment^ _0);
};
public ref class HTMLStartTagComment : CppSharp::Parser::AST::HTMLTagComment
{
public:
ref class Attribute : ICppInstance
{
public:
property ::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* NativePtr;
property System::IntPtr __Instance
{
virtual System::IntPtr get();
virtual void set(System::IntPtr instance);
}
Attribute(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* native);
static Attribute^ __CreateInstance(::System::IntPtr native);
Attribute();
Attribute(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ _0);
property System::String^ Name
{
System::String^ get();
void set(System::String^);
}
property System::String^ Value
{
System::String^ get();
void set(System::String^);
}
};
HTMLStartTagComment(::CppSharp::CppParser::AST::HTMLStartTagComment* native);
static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native);
HTMLStartTagComment();
HTMLStartTagComment(CppSharp::Parser::AST::HTMLStartTagComment^ _0);
property System::String^ TagName
{
System::String^ get();
void set(System::String^);
}
property unsigned int AttributesCount
{
unsigned int get();
}
CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ getAttributes(unsigned int i);
void addAttributes(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ s);
void clearAttributes();
};
public ref class HTMLEndTagComment : CppSharp::Parser::AST::HTMLTagComment
{
public:
HTMLEndTagComment(::CppSharp::CppParser::AST::HTMLEndTagComment* native);
static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native);
HTMLEndTagComment();
HTMLEndTagComment(CppSharp::Parser::AST::HTMLEndTagComment^ _0);
property System::String^ TagName
{
System::String^ get();
void set(System::String^);
}
};
public ref class TextComment : CppSharp::Parser::AST::InlineContentComment
{
public:
TextComment(::CppSharp::CppParser::AST::TextComment* native);
static TextComment^ __CreateInstance(::System::IntPtr native);
TextComment();
TextComment(CppSharp::Parser::AST::TextComment^ _0);
property System::String^ Text
{
System::String^ get();
void set(System::String^);
}
};
public ref class RawComment : ICppInstance

8
src/CppParser/Bindings/CLI/CppParser.cpp

@ -12,7 +12,7 @@ CppSharp::Parser::ParserOptions::ParserOptions(::CppSharp::CppParser::ParserOpti @@ -12,7 +12,7 @@ CppSharp::Parser::ParserOptions::ParserOptions(::CppSharp::CppParser::ParserOpti
CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer());
return gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer());
}
CppSharp::Parser::ParserOptions::ParserOptions()
@ -301,7 +301,7 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::Pars @@ -301,7 +301,7 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::Pars
CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer());
return gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer());
}
CppSharp::Parser::ParserDiagnostic::ParserDiagnostic()
@ -390,7 +390,7 @@ CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult @@ -390,7 +390,7 @@ CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult
CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer());
return gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer());
}
CppSharp::Parser::ParserResult::ParserResult()
@ -475,7 +475,7 @@ CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* n @@ -475,7 +475,7 @@ CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* n
CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer());
return gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer());
}
CppSharp::Parser::ParserResult^ CppSharp::Parser::ClangParser::ParseHeader(CppSharp::Parser::ParserOptions^ Opts)

2
src/CppParser/Bindings/CLI/Sources.cpp

@ -10,7 +10,7 @@ CppSharp::Parser::SourceLocation::SourceLocation(::CppSharp::CppParser::SourceLo @@ -10,7 +10,7 @@ CppSharp::Parser::SourceLocation::SourceLocation(::CppSharp::CppParser::SourceLo
CppSharp::Parser::SourceLocation^ CppSharp::Parser::SourceLocation::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*) native.ToPointer());
return gcnew ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*) native.ToPointer());
}
CppSharp::Parser::SourceLocation::SourceLocation(unsigned int ID)

2
src/CppParser/Bindings/CLI/Target.cpp

@ -10,7 +10,7 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(::CppSharp::CppParser::Pars @@ -10,7 +10,7 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(::CppSharp::CppParser::Pars
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native)
{
return gcnew CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
return gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
}
CppSharp::Parser::ParserTargetInfo::ParserTargetInfo()

2371
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs

File diff suppressed because it is too large Load Diff

11
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs

@ -822,6 +822,9 @@ namespace CppSharp @@ -822,6 +822,9 @@ namespace CppSharp
[FieldOffset(20)]
public global::System.IntPtr Library;
[FieldOffset(24)]
public global::System.IntPtr CodeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@ -1013,7 +1016,7 @@ namespace CppSharp @@ -1013,7 +1016,7 @@ namespace CppSharp
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
@ -1054,7 +1057,7 @@ namespace CppSharp @@ -1054,7 +1057,7 @@ namespace CppSharp
private static ClangParser.Internal* __CopyValue(ClangParser.Internal native)
{
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(1);
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(0);
*ret = native;
return ret;
}
@ -1073,14 +1076,14 @@ namespace CppSharp @@ -1073,14 +1076,14 @@ namespace CppSharp
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public ClangParser(CppSharp.Parser.ClangParser _0)
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((ClangParser.Internal*) __Instance) = *((ClangParser.Internal*) _0.__Instance);

2371
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

File diff suppressed because it is too large Load Diff

11
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs

@ -822,6 +822,9 @@ namespace CppSharp @@ -822,6 +822,9 @@ namespace CppSharp
[FieldOffset(20)]
public global::System.IntPtr Library;
[FieldOffset(24)]
public global::System.IntPtr CodeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")]
@ -1013,7 +1016,7 @@ namespace CppSharp @@ -1013,7 +1016,7 @@ namespace CppSharp
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
@ -1054,7 +1057,7 @@ namespace CppSharp @@ -1054,7 +1057,7 @@ namespace CppSharp
private static ClangParser.Internal* __CopyValue(ClangParser.Internal native)
{
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(1);
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(0);
*ret = native;
return ret;
}
@ -1073,14 +1076,14 @@ namespace CppSharp @@ -1073,14 +1076,14 @@ namespace CppSharp
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public ClangParser(CppSharp.Parser.ClangParser _0)
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((ClangParser.Internal*) __Instance) = *((ClangParser.Internal*) _0.__Instance);

2371
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs

File diff suppressed because it is too large Load Diff

11
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs

@ -822,6 +822,9 @@ namespace CppSharp @@ -822,6 +822,9 @@ namespace CppSharp
[FieldOffset(40)]
public global::System.IntPtr Library;
[FieldOffset(48)]
public global::System.IntPtr CodeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@ -1013,7 +1016,7 @@ namespace CppSharp @@ -1013,7 +1016,7 @@ namespace CppSharp
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
@ -1054,7 +1057,7 @@ namespace CppSharp @@ -1054,7 +1057,7 @@ namespace CppSharp
private static ClangParser.Internal* __CopyValue(ClangParser.Internal native)
{
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(1);
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(0);
*ret = native;
return ret;
}
@ -1073,14 +1076,14 @@ namespace CppSharp @@ -1073,14 +1076,14 @@ namespace CppSharp
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public ClangParser(CppSharp.Parser.ClangParser _0)
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((ClangParser.Internal*) __Instance) = *((ClangParser.Internal*) _0.__Instance);

2371
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs

File diff suppressed because it is too large Load Diff

11
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs

@ -822,6 +822,9 @@ namespace CppSharp @@ -822,6 +822,9 @@ namespace CppSharp
[FieldOffset(40)]
public global::System.IntPtr Library;
[FieldOffset(48)]
public global::System.IntPtr CodeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@ -1013,7 +1016,7 @@ namespace CppSharp @@ -1013,7 +1016,7 @@ namespace CppSharp
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
@ -1054,7 +1057,7 @@ namespace CppSharp @@ -1054,7 +1057,7 @@ namespace CppSharp
private static ClangParser.Internal* __CopyValue(ClangParser.Internal native)
{
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(1);
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(0);
*ret = native;
return ret;
}
@ -1073,14 +1076,14 @@ namespace CppSharp @@ -1073,14 +1076,14 @@ namespace CppSharp
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
public ClangParser(CppSharp.Parser.ClangParser _0)
{
__Instance = Marshal.AllocHGlobal(1);
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((ClangParser.Internal*) __Instance) = *((ClangParser.Internal*) _0.__Instance);

72
src/CppParser/Comments.cpp

@ -47,21 +47,20 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC) @@ -47,21 +47,20 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC)
return Comment;
}
#if 0
static InlineCommandComment::RenderKind
ConvertRenderKind(clang::comments::InlineCommandComment::RenderKind Kind)
{
using namespace clang::comments;
switch(Kind)
{
case InlineCommandComment::RenderNormal:
return InlineCommandComment::RenderKind::RenderNormal;
case InlineCommandComment::RenderBold:
return InlineCommandComment::RenderKind::RenderBold;
case InlineCommandComment::RenderMonospaced:
return InlineCommandComment::RenderKind::RenderMonospaced;
case InlineCommandComment::RenderEmphasized:
return InlineCommandComment::RenderKind::RenderEmphasized;
case clang::comments::InlineCommandComment::RenderNormal:
return CppSharp::CppParser::AST::InlineCommandComment::RenderKind::RenderNormal;
case clang::comments::InlineCommandComment::RenderBold:
return CppSharp::CppParser::AST::InlineCommandComment::RenderKind::RenderBold;
case clang::comments::InlineCommandComment::RenderMonospaced:
return CppSharp::CppParser::AST::InlineCommandComment::RenderKind::RenderMonospaced;
case clang::comments::InlineCommandComment::RenderEmphasized:
return CppSharp::CppParser::AST::InlineCommandComment::RenderKind::RenderEmphasized;
}
llvm_unreachable("Unknown render kind");
}
@ -72,30 +71,27 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di @@ -72,30 +71,27 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di
using namespace clang::comments;
switch(Dir)
{
case ParamCommandComment::In:
return ParamCommandComment::PassDirection::In;
case ParamCommandComment::Out:
return ParamCommandComment::PassDirection::Out;
case ParamCommandComment::InOut:
return ParamCommandComment::PassDirection::InOut;
case clang::comments::ParamCommandComment::In:
return CppSharp::CppParser::AST::ParamCommandComment::PassDirection::In;
case clang::comments::ParamCommandComment::Out:
return CppSharp::CppParser::AST::ParamCommandComment::PassDirection::Out;
case clang::comments::ParamCommandComment::InOut:
return CppSharp::CppParser::AST::ParamCommandComment::PassDirection::InOut;
}
llvm_unreachable("Unknown parameter pass direction");
}
static void HandleBlockCommand(const clang::comments::BlockCommandComment *CK,
BlockCommandComment^ BC)
BlockCommandComment* BC)
{
using namespace clix;
BC->CommandId = CK->getCommandID();
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = BlockCommandComment::Argument();
Arg.Text = marshalString<E_UTF8>(CK->getArgText(I));
BC->Arguments->Add(Arg);
Arg.Text = CK->getArgText(I);
BC->Arguments.push_back(Arg);
}
}
#endif
static Comment* ConvertCommentBlock(clang::comments::Comment* C)
{
@ -112,16 +108,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -112,16 +108,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::FullComment>(C);
auto FC = new FullComment();
_Comment = FC;
#if 0
for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I)
{
auto Content = ConvertCommentBlock(*I);
FC->Blocks->Add(dynamic_cast<BlockContentComment^>(Content));
FC->Blocks.push_back(cast<BlockContentComment>(Content));
}
break;
#endif
}
#if 0
case Comment::BlockCommandCommentKind:
{
auto CK = cast<const clang::comments::BlockCommandComment>(C);
@ -150,7 +143,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -150,7 +143,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
HandleBlockCommand(CK, TC);
if (CK->isPositionValid())
for (unsigned I = 0, E = CK->getDepth(); I != E; ++I)
TC->Position->Add(CK->getIndex(I));
TC->Position.push_back(CK->getIndex(I));
break;
}
case Comment::VerbatimBlockCommentKind:
@ -161,7 +154,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -161,7 +154,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I)
{
auto Line = ConvertCommentBlock(*I);
VB->Lines->Add(dynamic_cast<VerbatimBlockLineComment^>(Line));
VB->Lines.push_back(cast<VerbatimBlockLineComment>(Line));
}
break;
}
@ -170,7 +163,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -170,7 +163,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::VerbatimLineComment>(C);
auto VL = new VerbatimLineComment();
_Comment = VL;
VL->Text = marshalString<E_UTF8>(CK->getText());
VL->Text = CK->getText();
break;
}
case Comment::ParagraphCommentKind:
@ -181,7 +174,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -181,7 +174,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
for (auto I = CK->child_begin(), E = CK->child_end(); I != E; ++I)
{
auto Content = ConvertCommentBlock(*I);
PC->Content->Add(dynamic_cast<InlineContentComment^>(Content));
PC->Content.push_back(cast<InlineContentComment>(Content));
}
PC->IsWhitespace = CK->isWhitespace();
break;
@ -191,14 +184,14 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -191,14 +184,14 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::HTMLStartTagComment>(C);
auto TC = new HTMLStartTagComment();
_Comment = TC;
TC->TagName = marshalString<E_UTF8>(CK->getTagName());
TC->TagName = CK->getTagName();
for (unsigned I = 0, E = CK->getNumAttrs(); I != E; ++I)
{
auto A = CK->getAttr(I);
auto Attr = HTMLStartTagComment::Attribute();
Attr.Name = marshalString<E_UTF8>(A.Name);
Attr.Value = marshalString<E_UTF8>(A.Value);
TC->Attributes->Add(Attr);
Attr.Name = A.Name;
Attr.Value = A.Value;
TC->Attributes.push_back(Attr);
}
break;
}
@ -207,7 +200,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -207,7 +200,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::HTMLEndTagComment>(C);
auto TC = new HTMLEndTagComment();
_Comment = TC;
TC->TagName = marshalString<E_UTF8>(CK->getTagName());
TC->TagName = CK->getTagName();
break;
}
case Comment::TextCommentKind:
@ -215,7 +208,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -215,7 +208,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::TextComment>(C);
auto TC = new TextComment();
_Comment = TC;
TC->Text = marshalString<E_UTF8>(CK->getText());
TC->Text = CK->getText();
break;
}
case Comment::InlineCommandCommentKind:
@ -223,12 +216,12 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -223,12 +216,12 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::InlineCommandComment>(C);
auto IC = new InlineCommandComment();
_Comment = IC;
IC->Kind = ConvertRenderKind(CK->getRenderKind());
IC->CommentRenderKind = ConvertRenderKind(CK->getRenderKind());
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = InlineCommandComment::Argument();
Arg.Text = marshalString<E_UTF8>(CK->getArgText(I));
IC->Arguments->Add(Arg);
Arg.Text = CK->getArgText(I);
IC->Arguments.push_back(Arg);
}
break;
}
@ -237,10 +230,9 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -237,10 +230,9 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::VerbatimBlockLineComment>(C);
auto VL = new VerbatimBlockLineComment();
_Comment = VL;
VL->Text = marshalString<E_UTF8>(CK->getText());
VL->Text = CK->getText();
break;
}
#endif
case Comment::NoCommentKind: return nullptr;
default:
llvm_unreachable("Unknown comment kind");

Loading…
Cancel
Save