-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
52eabd4
commit 1ef17c5
Showing
13 changed files
with
401 additions
and
206 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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, | ||
|
||
} | ||
|
||
alias isCOMclass = Enum.isCOMclass; | ||
alias noPointers = Enum.noPointers; | ||
alias hasOffTi = Enum.hasOffTi; | ||
alias hasCtor = Enum.hasCtor; | ||
alias hasGetMembers = Enum.hasGetMembers; | ||
alias hasTypeInfo = Enum.hasTypeInfo; | ||
alias isAbstract = Enum.isAbstract; | ||
alias isCPPclass = Enum.isCPPclass; | ||
alias hasDtor = Enum.hasDtor; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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, | ||
|
||
} | ||
|
||
alias isCOMclass = Enum.isCOMclass; | ||
alias noPointers = Enum.noPointers; | ||
alias hasOffTi = Enum.hasOffTi; | ||
alias hasCtor = Enum.hasCtor; | ||
alias hasGetMembers = Enum.hasGetMembers; | ||
alias hasTypeInfo = Enum.hasTypeInfo; | ||
alias isAbstract = Enum.isAbstract; | ||
alias isCPPclass = Enum.isCPPclass; | ||
alias hasDtor = Enum.hasDtor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{{{}}{}} | ||
unittest{{{}}{}{{{{}}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
unittest | ||
{ | ||
{ | ||
{ | ||
} | ||
} | ||
{ | ||
} | ||
{ | ||
{ | ||
{ | ||
{ | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ unittest | |
version (A) | ||
{ | ||
case b: | ||
return; | ||
return; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ Label: | |
// comment | ||
statement(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
unittest | ||
{ | ||
if (a) | ||
if (b) | ||
doSomething(); | ||
doSomethingElse(); | ||
} | ||
|
||
void indent() | ||
{ | ||
import std.range : repeat, take; | ||
|
||
if (config.useTabs) | ||
foreach (i; 0 .. indentLevel + tempIndent) | ||
{ | ||
currentLineLength += config.tabSize; | ||
output.put("\t"); | ||
} | ||
else | ||
foreach (i; 0 .. indentLevel + tempIndent) | ||
foreach (j; 0 .. config.indentSize) | ||
{ | ||
output.put(" "); | ||
currentLineLength++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
unittest | ||
{ | ||
if (a) | ||
if (b) | ||
doSomething(); | ||
doSomethingElse(); | ||
} | ||
|
||
void indent() | ||
{ | ||
import std.range : repeat, take; | ||
|
||
if (config.useTabs) | ||
foreach (i; 0 .. indentLevel + tempIndent) | ||
{ | ||
currentLineLength += config.tabSize; | ||
output.put("\t"); | ||
} | ||
else | ||
foreach (i; 0 .. indentLevel + tempIndent) | ||
foreach (j; 0 .. config.indentSize) | ||
{ | ||
output.put(" "); | ||
currentLineLength++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
unittest | ||
{ | ||
switch (x) | ||
{ | ||
version (none) | ||
{ | ||
x(); | ||
case Case: | ||
doSomething(); | ||
doSomethingElse(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
unittest | ||
{ | ||
switch (x) | ||
{ | ||
version (none) | ||
{ | ||
x(); | ||
case Case: | ||
doSomething(); | ||
doSomethingElse(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version (AArch64) | ||
{ | ||
class SomeLongClassName | ||
{ | ||
public: | ||
|
||
double javaStyleFunctionName(double alpha, double bravo, double charlie, double delta, double echo, double foxtrot, double golf, double hotel) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie && echo < delta) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie && echo < delta) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie && echo < delta) | ||
{}}}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version (AArch64) | ||
{ | ||
class SomeLongClassName | ||
{ | ||
public: | ||
|
||
double javaStyleFunctionName(double alpha, double bravo, double charlie, | ||
double delta, double echo, double foxtrot, double golf, double hotel) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie | ||
&& echo < delta) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie | ||
&& echo < delta) | ||
{ | ||
if (alpha < beta && alpha > golf && hotel < alpha && bravo >= charlie | ||
&& echo < delta) | ||
{ | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |