Merge pull request #137 from Hackerpilot/0.3.1

0.3.1
This commit is contained in:
Brian Schott 2015-04-23 17:11:11 -07:00
commit d52ffd5ac0
8 changed files with 23 additions and 7 deletions

View File

@ -8,6 +8,11 @@ tab_width = 4
indent_size = 4 indent_size = 4
indent_style = tab indent_style = tab
[makefile]
tab_width = 4
indent_size = 4
indent_style = tab
[*.d] [*.d]
dfmt_align_switch_statements = true dfmt_align_switch_statements = true
dfmt_brace_style = allman dfmt_brace_style = allman

View File

@ -1,10 +1,10 @@
{ {
"name": "dfmt", "name": "dfmt",
"description": "Dfmt is a formatter for D source code", "description": "Dfmt is a formatter for D source code",
"version": "0.2.2", "version": "0.3.1",
"targetType": "executable", "targetType": "executable",
"license": "BSL-1.0", "license": "BSL-1.0",
"dependencies": { "dependencies": {
"libdparse": "~master" "libdparse": "~master"
}, }
} }

@ -1 +1 @@
Subproject commit 617b7c6f2c33cf7121c75ed2b88460d1416eb85c Subproject commit f0bb347b9aa9f9cb487531debc67c91057d602aa

View File

@ -763,7 +763,7 @@ private:
formatAt(); formatAt();
break; break;
case tok!"!": case tok!"!":
if (peekIs(tok!"is") && !peekBackIsOneOf(false, tok!"(", tok!"=")) if ((peekIs(tok!"is") || peekIs(tok!"in")) && !peekBackIsOneOf(false, tok!"(", tok!"="))
write(" "); write(" ");
goto case; goto case;
case tok!"...": case tok!"...":

View File

@ -62,7 +62,7 @@ else
"indent_style|t", &optConfig.indent_style, "indent_style|t", &optConfig.indent_style,
"inplace", &inplace, "inplace", &inplace,
"max_line_length", &optConfig.max_line_length, "max_line_length", &optConfig.max_line_length,
"max_line_length", &optConfig.max_line_length, "soft_max_line_length", &optConfig.dfmt_soft_max_line_length,
"outdent_attributes", &handleBooleans, "outdent_attributes", &handleBooleans,
"outdent_labels", &handleBooleans, "outdent_labels", &handleBooleans,
"space_after_cast", &handleBooleans, "space_after_cast", &handleBooleans,
@ -144,7 +144,7 @@ else
private void printHelp() private void printHelp()
{ {
writeln(`dfmt 0.3.0-dev writeln(`dfmt 0.3.1
Options: Options:
--help | -h Print this help message --help | -h Print this help message
@ -158,7 +158,7 @@ Formatting Options:
--indent_size --indent_size
--indent_style|t --indent_style|t
--inplace --inplace
--max_line_length --soft_max_line_length
--max_line_length --max_line_length
--outdent_attributes --outdent_attributes
--outdent_labels --outdent_labels

View File

@ -0,0 +1,4 @@
unittest
{
auto result = name !in aa;
}

4
tests/issue0136.d Normal file
View File

@ -0,0 +1,4 @@
unittest
{
auto result = name !in aa;
}

View File

@ -0,0 +1,3 @@
unittest {
auto result = name !in aa;
}