From be6f5706aeb75a83dd39338d683a1bcb74ad5c15 Mon Sep 17 00:00:00 2001 From: Gautam Kotian Date: Sun, 28 Feb 2016 00:11:19 +0100 Subject: [PATCH 1/3] Fix typos --- src/dfmt/formatter.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index e5c64c2..cd8466b 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -89,7 +89,7 @@ struct TokenFormatter(OutputRange) this.config = config; } - /// Runs the foramtting process + /// Runs the formatting process void format() { while (index < tokens.length) @@ -122,7 +122,7 @@ private: /// Information about the AST const ASTInformation* astInformation; - /// token indicies where line breaks should be placed + /// Token indices where line breaks should be placed size_t[] linebreakHints; /// Current indentation stack for the file @@ -311,7 +311,7 @@ private: // if writeToken(); // assume that the parens are present, otherwise the parser would not - // have told is there was a constraint here + // have told us there was a constraint here write(" "); writeParens(false); } From 649ee08e62e2f96a072aa74411cf82eba942411c Mon Sep 17 00:00:00 2001 From: Gautam Kotian Date: Sun, 28 Feb 2016 00:12:11 +0100 Subject: [PATCH 2/3] Fix typo in function name --- src/dfmt/formatter.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index cd8466b..4f10a64 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -210,7 +210,7 @@ private: || currentIs(tok!"debug")) && peekIs(tok!"(", false)) { if (!assumeSorted(astInformation.constraintLocations).equalRange(current.index).empty) - formatConstrtaint(); + formatConstraint(); else formatBlockHeader(); } @@ -277,7 +277,7 @@ private: writeToken(); } - void formatConstrtaint() + void formatConstraint() { with (TemplateConstraintStyle) final switch (config.dfmt_template_constraint_style) { From d7737c0da5c8371783b987a47c95b66225841809 Mon Sep 17 00:00:00 2001 From: Gautam Kotian Date: Sun, 28 Feb 2016 00:13:00 +0100 Subject: [PATCH 3/3] Add missing parameters in function documentation --- src/dfmt/formatter.d | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 4f10a64..1d34eff 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -73,10 +73,13 @@ struct TokenFormatter(OutputRange) { /** * Params: + * rawSource = ? * tokens = the tokens to format + * depths = ? * output = the output range that the code will be formatted to * astInformation = information about the AST used to inform formatting * decisions. + * config = ? */ this(const ubyte[] rawSource, const(Token)[] tokens, immutable short[] depths, OutputRange output, ASTInformation* astInformation, Config* config)