From 16e4ed410f2bc29e528bf6ec872bdf92478749a7 Mon Sep 17 00:00:00 2001 From: Rowan Goemans Date: Sun, 31 Dec 2017 02:54:54 +0100 Subject: -- Added test for constructors and destructors. -- Removed config value for null on bool pointer return. I think it's to confusing for users. -- Fixed some small remaining refactor bugs. --- src/Lang/C/CParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Lang/C/CParser.ts') diff --git a/src/Lang/C/CParser.ts b/src/Lang/C/CParser.ts index 6d3d85b..859dc6b 100644 --- a/src/Lang/C/CParser.ts +++ b/src/Lang/C/CParser.ts @@ -297,7 +297,7 @@ export default class CParser implements ICodeParser { const func = this.GetArgument(tree); // check if it is a constructor or descructor since these have no name.. // and reverse the assignment of type and name. - if (func.name === undefined) { + if (func.name === null) { if (func.type.nodes.length !== 1) { throw new Error("Too many symbols found for constructor/descructor."); } else if (func.type.nodes[0] instanceof CParseTree) { -- cgit v1.2.3