diff --git a/src/v2/formatters/procedureParameter/ProcedureParameterFormatter.ts b/src/v2/formatters/procedureParameter/ProcedureParameterFormatter.ts index ccca7e13..bf15e30b 100644 --- a/src/v2/formatters/procedureParameter/ProcedureParameterFormatter.ts +++ b/src/v2/formatters/procedureParameter/ProcedureParameterFormatter.ts @@ -160,6 +160,9 @@ export class ProcedureParameterFormatter ); break; } + case SyntaxNodeType.Error: + newString = FormatterHelper.getCurrentText(node, fullText); + break; default: { const text = FormatterHelper.getCurrentText( node, @@ -192,6 +195,9 @@ export class ProcedureParameterFormatter let newString = ""; const text = FormatterHelper.getCurrentText(node, fullText).trim(); switch (node.type) { + case SyntaxNodeType.Error: + newString = FormatterHelper.getCurrentText(node, fullText); + break; default: newString = text.length === 0 ? "" : " " + text; break; diff --git a/src/v2/formatters/variableDefinition/VariableDefinitionFormatter.ts b/src/v2/formatters/variableDefinition/VariableDefinitionFormatter.ts index 89b679f2..f893b115 100644 --- a/src/v2/formatters/variableDefinition/VariableDefinitionFormatter.ts +++ b/src/v2/formatters/variableDefinition/VariableDefinitionFormatter.ts @@ -189,6 +189,9 @@ export class VariableDefinitionFormatter VariableDefinitionFormatter.alignType - text.length ); break; + case SyntaxNodeType.Error: + newString = FormatterHelper.getCurrentText(node, fullText); + break; default: { const text = FormatterHelper.getCurrentText( node, @@ -221,6 +224,9 @@ export class VariableDefinitionFormatter let newString = ""; const text = FormatterHelper.getCurrentText(node, fullText).trim(); switch (node.type) { + case SyntaxNodeType.Error: + newString = FormatterHelper.getCurrentText(node, fullText); + break; default: newString = text.length === 0 ? "" : " " + text; break;