This commit is contained in:
Hackerpilot 2015-03-15 03:12:09 -07:00
parent ed2bf996b3
commit 752674f233
7 changed files with 51 additions and 13 deletions

View File

@ -380,6 +380,11 @@ private:
if (!currentIs(tok!";"))
write(" ");
break;
case tok!"enum":
indents.push(tok!"enum");
writeToken();
write(" ");
break;
default:
if (index + 1 < tokens.length)
{
@ -670,7 +675,12 @@ private:
break;
case tok!",":
regenLineBreakHintsIfNecessary(index);
if (!peekIs(tok!"}") && (linebreakHints.canFind(index)
if (indents.indentToMostRecent(tok!"enum") != -1 && !peekIs(tok!"}"))
{
writeToken();
newline();
}
else if (!peekIs(tok!"}") && (linebreakHints.canFind(index)
|| (linebreakHints.length == 0 && currentLineLength > config.columnSoftLimit)))
{
writeToken();

View File

@ -1,6 +1,9 @@
enum Flags : int
{
IS_NOT_TOP_TYPE = 0x1, MANGLE_RETURN_TYPE = 0x2, IGNORE_CONST = 0x4, IS_DMC = 0x8,
IS_NOT_TOP_TYPE = 0x1,
MANGLE_RETURN_TYPE = 0x2,
IGNORE_CONST = 0x4,
IS_DMC = 0x8,
}
auto a = [b, c, d,];

View File

@ -1,7 +1,12 @@
enum DYNCAST : int
{
DYNCAST_OBJECT, DYNCAST_EXPRESSION, DYNCAST_DSYMBOL, DYNCAST_TYPE,
DYNCAST_IDENTIFIER, DYNCAST_TUPLE, DYNCAST_PARAMETER,
DYNCAST_OBJECT,
DYNCAST_EXPRESSION,
DYNCAST_DSYMBOL,
DYNCAST_TYPE,
DYNCAST_IDENTIFIER,
DYNCAST_TUPLE,
DYNCAST_PARAMETER,
}
alias MATCHnomatch = MATCH.MATCHnomatch;

View File

@ -3,9 +3,15 @@ struct ClassFlags
alias Type = uint;
enum Enum : int
{
isCOMclass = 0x1, noPointers = 0x2, hasOffTi = 0x4, hasCtor = 0x8,
hasGetMembers = 0x10, hasTypeInfo = 0x20, isAbstract = 0x40,
isCPPclass = 0x80, hasDtor = 0x100,
isCOMclass = 0x1,
noPointers = 0x2,
hasOffTi = 0x4,
hasCtor = 0x8,
hasGetMembers = 0x10,
hasTypeInfo = 0x20,
isAbstract = 0x40,
isCPPclass = 0x80,
hasDtor = 0x100,
}

View File

@ -1,5 +1,8 @@
enum Flags : int {
IS_NOT_TOP_TYPE = 0x1, MANGLE_RETURN_TYPE = 0x2, IGNORE_CONST = 0x4, IS_DMC = 0x8,
IS_NOT_TOP_TYPE = 0x1,
MANGLE_RETURN_TYPE = 0x2,
IGNORE_CONST = 0x4,
IS_DMC = 0x8,
}
auto a = [b, c, d,];

View File

@ -1,6 +1,11 @@
enum DYNCAST : int {
DYNCAST_OBJECT, DYNCAST_EXPRESSION, DYNCAST_DSYMBOL, DYNCAST_TYPE,
DYNCAST_IDENTIFIER, DYNCAST_TUPLE, DYNCAST_PARAMETER,
DYNCAST_OBJECT,
DYNCAST_EXPRESSION,
DYNCAST_DSYMBOL,
DYNCAST_TYPE,
DYNCAST_IDENTIFIER,
DYNCAST_TUPLE,
DYNCAST_PARAMETER,
}
alias MATCHnomatch = MATCH.MATCHnomatch;

View File

@ -1,9 +1,15 @@
struct ClassFlags {
alias Type = uint;
enum Enum : int {
isCOMclass = 0x1, noPointers = 0x2, hasOffTi = 0x4, hasCtor = 0x8,
hasGetMembers = 0x10, hasTypeInfo = 0x20, isAbstract = 0x40,
isCPPclass = 0x80, hasDtor = 0x100,
isCOMclass = 0x1,
noPointers = 0x2,
hasOffTi = 0x4,
hasCtor = 0x8,
hasGetMembers = 0x10,
hasTypeInfo = 0x20,
isAbstract = 0x40,
isCPPclass = 0x80,
hasDtor = 0x100,
}