DGen
- Don't write a blank line at the top of the header comment (see `emitHeaderComment()`)
This commit is contained in:
parent
15617e7ced
commit
5a22b184b7
|
@ -44,8 +44,7 @@ public final class DCodeEmitter : CodeEmitter
|
|||
string moduleName = typeChecker.getResolver().generateName(typeChecker.getModule(), typeChecker.getModule()); //TODO: Lookup actual module name (I was lazy)
|
||||
string outputCFilename = file.name();
|
||||
|
||||
file.write(`
|
||||
/**
|
||||
file.write(`/**
|
||||
* TLP compiler generated code
|
||||
*
|
||||
* Module name: `);
|
||||
|
|
|
@ -4,6 +4,7 @@ import compiler.typecheck.core;
|
|||
import gogga;
|
||||
import compiler.symbols.data;
|
||||
import std.string;
|
||||
import std.conv : to;
|
||||
|
||||
public final class Resolver
|
||||
{
|
||||
|
@ -123,6 +124,9 @@ public final class Resolver
|
|||
* cast should never fail
|
||||
*/
|
||||
assert(cast(Entity) currentEntity.parentOf());
|
||||
// FIXME: Enable this below whenever we have any sort of crash
|
||||
// (There is a case where we have it fail on `Variable (Ident: p, Type: int)`)
|
||||
gprintln("AssertFail Check: "~to!(string)(currentEntity));
|
||||
currentEntity = cast(Entity)(currentEntity.parentOf());
|
||||
|
||||
if (currentEntity == c)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
module typeChecking3;
|
||||
|
||||
|
||||
|
||||
discard "rsolution.d(126) seems to fail below (REMOVE THIS WHEN FIXED)";
|
||||
int t;
|
||||
int p = 21;
|
||||
p=2+p;
|
||||
int j = 2;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
/**
|
||||
* TLP compiler generated code
|
||||
*
|
||||
* Module name: simple_variables
|
||||
* Output C file: tlangout.c
|
||||
*/
|
||||
|
||||
[Instruction: compiler.codegen.instruction.VariableDeclaration:varName: simple_variables.x]
|
||||
[Instruction: compiler.codegen.instruction.VariableAssignmentInstr:assignTo: simple_variables.x, valInstr: [Instruction: compiler.codegen.instruction.BinOpInstr:BinOpType: ADD, LhsValInstr: [Instruction: compiler.codegen.instruction.LiteralValue:Data: 1, Length: 4], RhsValInstr: [Instruction: compiler.codegen.instruction.LiteralValue:Data: 2, Length: 4]]]
|
||||
[Instruction: compiler.codegen.instruction.VariableDeclaration:varName: simple_variables.y]
|
||||
[Instruction: compiler.codegen.instruction.VariableAssignmentInstr:assignTo: simple_variables.y, valInstr: [Instruction: compiler.codegen.instruction.LiteralValue:Data: 2, Length: 4]]
|
Loading…
Reference in New Issue