fix: store unit tests in AST
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
This commit is contained in:
parent
3b80011673
commit
16028a8f62
|
@ -14,6 +14,7 @@ import dmd.astcodegen;
|
|||
import dmd.transitivevisitor;
|
||||
import dmd.permissivevisitor;
|
||||
import dmd.frontend;
|
||||
import dmd.globals;
|
||||
import dfmt.ast;
|
||||
import dfmt.config;
|
||||
import std.array;
|
||||
|
@ -33,6 +34,7 @@ bool format(string source_desc, ubyte[] buffer, File.LockingTextWriter output,
|
|||
Config* formatterConfig)
|
||||
{
|
||||
initDMD();
|
||||
global.params.useUnitTests = true;
|
||||
auto module_ = parseModule(source_desc)[0];
|
||||
scope v = new FormatVisitor(output, formatterConfig);
|
||||
v.visit(module_);
|
||||
|
|
Loading…
Reference in New Issue