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

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

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

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

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

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

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

4
src/Parser/ASTConverter.cs

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

Loading…
Cancel
Save