kate butchered averything :(
This commit is contained in:
@@ -1048,25 +1048,25 @@ abstract class Cpp2BeefGenerator
|
|||||||
|
|
||||||
//TODO: move to custom utils
|
//TODO: move to custom utils
|
||||||
/* // This formats the tokens instead of copying the format 1:1
|
/* // This formats the tokens instead of copying the format 1:1
|
||||||
* const CXTokenKind Unary = (.)-1;
|
const CXTokenKind Unary = (.)-1;
|
||||||
* var prevKind;
|
var prevKind;
|
||||||
* for (let token in tokens)
|
for (let token in tokens)
|
||||||
* {
|
{
|
||||||
* let spelling = ScopeCXString!(Clang.GetTokenSpelling(unit, token));
|
let spelling = ScopeCXString!(Clang.GetTokenSpelling(unit, token));
|
||||||
* let kind = Clang.GetTokenKind(token);
|
let kind = Clang.GetTokenKind(token);
|
||||||
* token: switch (kind)
|
token: switch (kind)
|
||||||
* {
|
{
|
||||||
* case .Keyword, .Identifier, .Literal:
|
case .Keyword, .Identifier, .Literal:
|
||||||
* if (prevKind == .Keyword || prevKind == .Identifier || prevKind == .Punctuation)
|
if (prevKind == .Keyword || prevKind == .Identifier || prevKind == .Punctuation)
|
||||||
* str.Append(' ');
|
str.Append(' ');
|
||||||
* if (kind == .Identifier) do
|
if (kind == .Identifier) do
|
||||||
* {
|
{
|
||||||
* var cursor = Clang.GetCursor(unit, Clang.GetTokenLocation(unit, token));
|
var cursor = Clang.GetCursor(unit, Clang.GetTokenLocation(unit, token));
|
||||||
* if (Clang.Cursor_IsNull(cursor) != 0) break;
|
if (Clang.Cursor_IsNull(cursor) != 0) break;
|
||||||
* cursor = Clang.GetCursorDefinition(cursor);
|
cursor = Clang.GetCursorDefinition(cursor);
|
||||||
* if (Clang.Cursor_IsNull(cursor) != 0) break;
|
if (Clang.Cursor_IsNull(cursor) != 0) break;
|
||||||
* GetNameInBindings(cursor, str);
|
GetNameInBindings(cursor, str);
|
||||||
* break token;
|
break token;
|
||||||
}
|
}
|
||||||
str.Append(spelling);
|
str.Append(spelling);
|
||||||
if (kind == .Literal && str.EndsWith("LL"))
|
if (kind == .Literal && str.EndsWith("LL"))
|
||||||
@@ -1407,17 +1407,17 @@ abstract class Cpp2BeefGenerator
|
|||||||
BeginBody!(cursor);
|
BeginBody!(cursor);
|
||||||
//TODO
|
//TODO
|
||||||
/*Clang.VisitChildren(cursor, (cursor, parent, client_data) =>
|
/*Clang.VisitChildren(cursor, (cursor, parent, client_data) =>
|
||||||
* {
|
{
|
||||||
* Self self = (.)Internal.UnsafeCastToObject(client_data);
|
Self self = (.)Internal.UnsafeCastToObject(client_data);
|
||||||
* switch (cursor.kind)
|
switch (cursor.kind)
|
||||||
* {
|
{
|
||||||
* case .FieldDecl, .CXXMethod, .Constructor, .Destructor, .ConversionFunction, .FunctionDecl, .VarDecl,
|
case .FieldDecl, .CXXMethod, .Constructor, .Destructor, .ConversionFunction, .FunctionDecl, .VarDecl,
|
||||||
* .FunctionTemplate, .ClassTemplate, .TypeAliasTemplateDecl, .StructDecl, .ClassDecl,
|
.FunctionTemplate, .ClassTemplate, .TypeAliasTemplateDecl, .StructDecl, .ClassDecl,
|
||||||
* .UnionDecl, .EnumDecl, .TypeAliasDecl, .TypedefDecl:
|
.UnionDecl, .EnumDecl, .TypeAliasDecl, .TypedefDecl:
|
||||||
* self.WriteComments(cursor);
|
self.WriteComments(cursor);
|
||||||
* return .Break;
|
return .Break;
|
||||||
* default:
|
default:
|
||||||
* return .Continue;
|
return .Continue;
|
||||||
}
|
}
|
||||||
}, Internal.UnsafeCastToPtr(this));*/
|
}, Internal.UnsafeCastToPtr(this));*/
|
||||||
|
|
||||||
@@ -1445,12 +1445,12 @@ abstract class Cpp2BeefGenerator
|
|||||||
str.Append(">\";\n", cursorIndent);
|
str.Append(">\";\n", cursorIndent);
|
||||||
str.Append("private const String __template_chain = CppWrapperF($\"", wrapperTemplateChain, "\");\n\n", cursorIndent);
|
str.Append("private const String __template_chain = CppWrapperF($\"", wrapperTemplateChain, "\");\n\n", cursorIndent);
|
||||||
/*str.Append("[CppWriteToWrapper<\"", WrapperFilePath, "\">(\"\\ntemplate ");
|
/*str.Append("[CppWriteToWrapper<\"", WrapperFilePath, "\">(\"\\ntemplate ");
|
||||||
* switch (cursor.kind)
|
switch (cursor.kind)
|
||||||
* {
|
{
|
||||||
* case .StructDecl: str.Append("struct ");
|
case .StructDecl: str.Append("struct ");
|
||||||
* case . ClassDecl: str.Append("class " );
|
case . ClassDecl: str.Append("class " );
|
||||||
* case . UnionDecl: str.Append("union " );
|
case . UnionDecl: str.Append("union " );
|
||||||
* default: Runtime.FatalError();
|
default: Runtime.FatalError();
|
||||||
}
|
}
|
||||||
str.Append("\" + __cpp_type + \";\\n\")]\n\n", indent);*/
|
str.Append("\" + __cpp_type + \";\\n\")]\n\n", indent);*/
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user