From 5e24af15bf144f0db7ac5f77534e77d3e6688d28 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 14 Apr 2016 08:27:02 +0200 Subject: [PATCH] cesyms, rnamed this and ~this to ctor and dtor --- cesyms/cesyms.d | 20 ++++++++++---------- etc/libdparse | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cesyms/cesyms.d b/cesyms/cesyms.d index 2fd939a8..06d5f208 100644 --- a/cesyms/cesyms.d +++ b/cesyms/cesyms.d @@ -72,7 +72,7 @@ void main(string[] args) { SymbolListBuilder!(ListFmt.Pas) slb = construct!(SymbolListBuilder!(ListFmt.Pas)); auto ast = parseModule(getTokensForParser(source, config, &scache), fname, - &alloc, &(slb.astError)); + &alloc, &slb.astError); foreach (Declaration decl; ast.declarations) slb.visit(decl); write(slb.serialize); @@ -82,7 +82,7 @@ void main(string[] args) { SymbolListBuilder!(ListFmt.Json) slb = construct!(SymbolListBuilder!(ListFmt.Json)); auto ast = parseModule(getTokensForParser(source, config, &scache), fname, - &alloc, &(slb.astError)); + &alloc, &slb.astError); foreach (Declaration decl; ast.declarations) slb.visit(decl); write(slb.serialize); @@ -125,7 +125,7 @@ void* getMem(size_t size) nothrow } CT construct(CT, A...)(A a) - if (is(CT == class) && !isAbstractClass!CT) +if (is(CT == class) && !isAbstractClass!CT) { auto size = typeid(CT).init.length; auto memory = getMem(size); @@ -139,7 +139,7 @@ CT construct(CT, A...)(A a) } void destruct(T)(ref T instance) - if (is(T == class) || (isPointer!T && is(PointerTarget!T == struct))) +if (is(T == class)) { if (!instance) return; @@ -345,12 +345,12 @@ class SymbolListBuilder(ListFmt Fmt): ASTVisitor final override void visit(const Constructor decl) { - otherVisitorImpl(decl, SymbolType._function, "this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "ctor", decl.line, decl.column); } final override void visit(const Destructor decl) { - otherVisitorImpl(decl, SymbolType._function, "~this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "dtor", decl.line, decl.column); } final override void visit(const EnumDeclaration decl) @@ -423,22 +423,22 @@ class SymbolListBuilder(ListFmt Fmt): ASTVisitor final override void visit(const StaticConstructor decl) { - otherVisitorImpl(decl, SymbolType._function, "static this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "static ctor", decl.line, decl.column); } final override void visit(const StaticDestructor decl) { - otherVisitorImpl(decl, SymbolType._function, "static ~this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "static dtor", decl.line, decl.column); } final override void visit(const SharedStaticConstructor decl) { - otherVisitorImpl(decl, SymbolType._function, "shared static this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "shared static ctor", decl.line, decl.column); } final override void visit(const SharedStaticDestructor decl) { - otherVisitorImpl(decl, SymbolType._function, "shared static ~this", decl.line, decl.column); + otherVisitorImpl(decl, SymbolType._function, "shared static dtor", decl.line, decl.column); } } //---- diff --git a/etc/libdparse b/etc/libdparse index 108960c3..20837c1d 160000 --- a/etc/libdparse +++ b/etc/libdparse @@ -1 +1 @@ -Subproject commit 108960c30fd12c031ce1d2f4d8f92b4b2da3e6d4 +Subproject commit 20837c1d838fb8c0a51fd32f1492dcc8e7b06a00