Browse Source

Remove "Ordinary" prefix from BCPL and C comment kinds.

pull/769/head
Joao Matos 9 years ago
parent
commit
3bfb24228b
  1. 24
      src/AST/Comment.cs
  2. 2
      src/Generator/Generators/CLI/CLIHeaders.cs
  3. 2
      src/Generator/Generators/CLI/CLISources.cs
  4. 2
      src/Generator/Generators/CSharp/CSharpSources.cs
  5. 4
      src/Parser/ASTConverter.cs

24
src/AST/Comment.cs

@ -10,10 +10,10 @@ namespace CppSharp.AST @@ -10,10 +10,10 @@ namespace CppSharp.AST
{
// Invalid comment.
Invalid,
// Any normal BCPL comments.
OrdinaryBCPL,
// Any normal C comment.
OrdinaryC,
// "// stuff"
BCPL,
// "/* stuff */"
C,
// "/// stuff"
BCPLSlash,
// "//! stuff"
@ -80,8 +80,8 @@ namespace CppSharp.AST @@ -80,8 +80,8 @@ namespace CppSharp.AST
{
get
{
return Kind == CommentKind.OrdinaryBCPL ||
Kind == CommentKind.OrdinaryC;
return Kind == CommentKind.BCPL ||
Kind == CommentKind.C;
}
}
@ -131,10 +131,10 @@ namespace CppSharp.AST @@ -131,10 +131,10 @@ namespace CppSharp.AST
{
switch (kind)
{
case CommentKind.OrdinaryBCPL:
case CommentKind.BCPL:
case CommentKind.BCPLExcl:
return "//";
case CommentKind.OrdinaryC:
case CommentKind.C:
case CommentKind.JavaDoc:
case CommentKind.Qt:
return " *";
@ -149,10 +149,10 @@ namespace CppSharp.AST @@ -149,10 +149,10 @@ namespace CppSharp.AST
{
switch (kind)
{
case CommentKind.OrdinaryBCPL:
case CommentKind.BCPL:
case CommentKind.BCPLSlash:
return string.Empty;
case CommentKind.OrdinaryC:
case CommentKind.C:
return "/*";
case CommentKind.BCPLExcl:
return "//!";
@ -169,11 +169,11 @@ namespace CppSharp.AST @@ -169,11 +169,11 @@ namespace CppSharp.AST
{
switch (kind)
{
case CommentKind.OrdinaryBCPL:
case CommentKind.BCPL:
case CommentKind.BCPLSlash:
case CommentKind.BCPLExcl:
return string.Empty;
case CommentKind.OrdinaryC:
case CommentKind.C:
case CommentKind.JavaDoc:
case CommentKind.Qt:
return " */";

2
src/Generator/Generators/CLI/CLIHeaders.cs

@ -21,7 +21,7 @@ namespace CppSharp.Generators.CLI @@ -21,7 +21,7 @@ namespace CppSharp.Generators.CLI
public override void Process()
{
GenerateFilePreamble(CommentKind.OrdinaryBCPL);
GenerateFilePreamble(CommentKind.BCPL);
PushBlock(CLIBlockKind.Includes);
WriteLine("#pragma once");

2
src/Generator/Generators/CLI/CLISources.cs

@ -24,7 +24,7 @@ namespace CppSharp.Generators.CLI @@ -24,7 +24,7 @@ namespace CppSharp.Generators.CLI
public override void Process()
{
GenerateFilePreamble(CommentKind.OrdinaryBCPL);
GenerateFilePreamble(CommentKind.BCPL);
var file = Path.GetFileNameWithoutExtension(TranslationUnit.FileName)
.Replace('\\', '/');

2
src/Generator/Generators/CSharp/CSharpSources.cs

@ -144,7 +144,7 @@ namespace CppSharp.Generators.CSharp @@ -144,7 +144,7 @@ namespace CppSharp.Generators.CSharp
public override void Process()
{
GenerateFilePreamble(CommentKind.OrdinaryBCPL);
GenerateFilePreamble(CommentKind.BCPL);
GenerateUsings();

4
src/Parser/ASTConverter.cs

@ -894,9 +894,9 @@ namespace CppSharp @@ -894,9 +894,9 @@ namespace CppSharp
case RawCommentKind.Invalid:
return AST.CommentKind.Invalid;
case RawCommentKind.OrdinaryBCPL:
return AST.CommentKind.OrdinaryBCPL;
return AST.CommentKind.BCPL;
case RawCommentKind.OrdinaryC:
return AST.CommentKind.OrdinaryC;
return AST.CommentKind.C;
case RawCommentKind.BCPLSlash:
return AST.CommentKind.BCPLSlash;
case RawCommentKind.BCPLExcl:

Loading…
Cancel
Save