Skip to content

Commit

Permalink
fix section header being included in some traits
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed May 2, 2023
1 parent 64e318e commit 0e85f16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 3 additions & 12 deletions common/src/dcd/common/constants2.d
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,7 @@ $(CONSOLE
tuple("pure", "nothrow", "@nogc", "@trusted")
)
)
)
$(H2 $(LNAME2 function-parameters, Function Parameter Traits))`),
)`),
ConstantCompletion("getFunctionVariadicStyle", `$(P
Takes one argument which must either be a function symbol, or a type
that is a function, delegate or a function pointer.
Expand Down Expand Up @@ -891,10 +888,7 @@ void main()
C c = cast(C) ptr;
assert(c.i == 4);
}
---
$(H2 $(LNAME2 functions, Function Traits))`),
---`),
ConstantCompletion("isAbstractClass", `$(P If the arguments are all either types that are abstract classes,
or expressions that are typed as abstract classes, then $(D true)
is returned.
Expand Down Expand Up @@ -1670,10 +1664,7 @@ void foreachExample(C c, int x)
static assert(is(typeof(__traits(parameters)) == AliasSeq!(C, int)));
}
}
---
$(H2 $(LNAME2 symbols, Symbol Traits))`),
---`),
ConstantCompletion("parent", `$(P Takes a single argument which must evaluate to a symbol.
The result is the symbol that is the parent of it.
)`),
Expand Down
5 changes: 5 additions & 0 deletions constants-gen/generator.d
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ ConstantCompletion[] parseTraits(string ddoc)
foundTerminator = true;
break;
}
else if (line.startsWith("$(H2 $(LNAME2"))
{
addCurrent();
seekingToFirst = true;
}
else if (line.canFind("$(GNAME "))
{
addCurrent();
Expand Down

0 comments on commit 0e85f16

Please sign in to comment.