Skip to content

Commit 5d52249

Browse files
authored
Merge pull request #2758 from Geod24/magic
Update assert_writeln_magic to the latest libdparse merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents b2571d7 + 65d3d8c commit 5d52249

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

ddoc/dub.sdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name "ddoc_preprocessor"
22
description "Preprocesses source code before running Ddoc over it"
3-
dependency "libdparse" version="~>0.8.7"
3+
dependency "libdparse" version="~>0.15.1"
44
dependency "dmd" path="../../dmd"
55
versions "DdocOptions"
66
buildRequirements "disallowDeprecations"

ddoc/dub.selections.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"fileVersion": 1,
33
"versions": {
44
"dmd": {"path":"../../dmd"},
5-
"libdparse": "0.8.7",
6-
"stdx-allocator": "2.77.2"
5+
"libdparse": "0.15.4",
6+
"stdx-allocator": "2.77.5"
77
}
88
}

ddoc/source/assert_writeln_magic.d

100644100755
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env dub
22
/++ dub.sdl:
3-
dependency "libdparse" version="0.7.2-alpha.4"
3+
dependency "libdparse" version="0.15.1"
44
name "assert_writeln_magic"
55
+/
66
/*
@@ -76,7 +76,8 @@ class TestVisitor(Out) : ASTVisitor
7676
return;
7777

7878
// only look at `a == b` within the AssertExpression
79-
if (typeid(expr.assertion) != typeid(CmpExpression))
79+
if (!expr.assertArguments ||
80+
typeid(expr.assertArguments.assertion) != typeid(CmpExpression))
8081
return;
8182

8283
lastAssert = expr;
@@ -180,15 +181,15 @@ private:
180181
void parseString(Visitor)(ubyte[] sourceCode, Visitor visitor)
181182
{
182183
import dparse.lexer;
183-
import dparse.parser : parseModule;
184+
import dparse.parser : parseModule, ParserConfig;
184185
import dparse.rollback_allocator : RollbackAllocator;
185186

186187
LexerConfig config;
187188
auto cache = StringCache(StringCache.defaultBucketCount);
188189
const(Token)[] tokens = getTokensForParser(sourceCode, config, &cache).array;
189190

190191
RollbackAllocator rba;
191-
auto m = parseModule(tokens, "magic.d", &rba);
192+
auto m = parseModule(ParserConfig(tokens, "magic.d", &rba));
192193
visitor.visit(m);
193194
}
194195

ddoc/source/preprocessor.d

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ auto compile(R)(R buffer, string[] arguments, string inputFile, string[string] m
114114
import std.process : execute;
115115
auto ret = execute(args);
116116
if (ret.status != 0)
117+
{
118+
stderr.writeln("File content:");
119+
stderr.writeln(buffer);
120+
stderr.writeln("----------------------------------------");
117121
stderr.writeln(ret.output);
122+
}
118123
return ret.status;
119124
}
120125

dpl-docs/dub.selections.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"botan": "1.12.10",
4+
"botan": "1.12.18",
55
"botan-math": "1.0.3",
66
"ddoc_preprocessor": {"path":"../ddoc"},
7-
"ddox": "0.16.11",
8-
"diet-ng": "1.5.0",
7+
"ddox": "0.16.15",
8+
"diet-ng": "1.7.2",
99
"dmd": {"path":"../../dmd"},
10-
"eventcore": "0.8.35",
11-
"hyphenate": "1.1.1",
12-
"libasync": "0.8.3",
13-
"libdparse": "0.8.7",
10+
"eventcore": "0.9.7",
11+
"hyphenate": "1.1.2",
12+
"libasync": "0.8.6",
13+
"libdparse": "0.15.4",
1414
"libevent": "2.0.2+2.0.16",
15-
"memutils": "0.4.11",
16-
"mir-linux-kernel": "1.0.0",
15+
"memutils": "1.0.4",
16+
"mir-linux-kernel": "1.0.1",
1717
"openssl": "1.1.6+1.0.1g",
18-
"stdx-allocator": "2.77.2",
19-
"taggedalgebraic": "0.10.11",
20-
"vibe-core": "1.4.0",
21-
"vibe-d": "0.8.4"
18+
"stdx-allocator": "2.77.5",
19+
"taggedalgebraic": "0.11.16",
20+
"vibe-core": "1.9.3",
21+
"vibe-d": "0.9.0"
2222
}
2323
}

0 commit comments

Comments
 (0)