From ff58e3ea80d3d7745cee922694f015ec45ef4394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Sun, 18 Dec 2016 14:53:56 +0100 Subject: [PATCH] bug fix #319 --- CodeCompletion/CodeFormatter.cs | 25 +++++++++++++++++++ .../PascalABCParserNewSaushkin/ABCPascal.cs | 6 ++--- .../PascalABCParserNewSaushkin/ABCPascal.y | 2 +- .../ABCPascalYacc.cs | 14 +++++------ 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/CodeCompletion/CodeFormatter.cs b/CodeCompletion/CodeFormatter.cs index fa3b23480..e64ad75d9 100644 --- a/CodeCompletion/CodeFormatter.cs +++ b/CodeCompletion/CodeFormatter.cs @@ -2824,6 +2824,31 @@ namespace CodeFormatters visit_node(yn.ex); } + public override void visit(assign_var_tuple _assign_var_tuple) + { + read_from_beg_pos = true; + for (int i = 0; i < _assign_var_tuple.vars.variables.Count; i++) + { + if (options.SpaceBetweenArguments == 1) + { + add_space_after = true; + } + visit_node(_assign_var_tuple.vars.variables[i]); + add_space_before = true; + } + visit_node(_assign_var_tuple.expr); + } + + public override void visit(slice_expr _slice_expr) + { + visit_node(_slice_expr.v); + if (_slice_expr.from != null) + visit_node(_slice_expr.from); + if (_slice_expr.to != null) + visit_node(_slice_expr.to); + if (_slice_expr.step != null) + visit_node(_slice_expr.step); + } #endregion } } \ No newline at end of file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 6e725320d..e302066bc 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-8EAQPI9 -// DateTime: 12.12.2016 11:36:35 -// UserName: ????????? +// Machine: IVAN-PC +// DateTime: 18.12.2016 12:52:06 +// UserName: Ivan // GPLEX input file // GPLEX frame file // diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index f343d6e98..aa9a4e134 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -3086,7 +3086,7 @@ variable if (el.expressions.Count==1 && el.expressions[0] is format_expr) { var fe = el.expressions[0] as format_expr; - $$ = new slice_expr($1 as addressed_value,fe.expr,fe.format1,fe.format2,fe.source_context); + $$ = new slice_expr($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$); } else $$ = new indexer($1 as addressed_value,el, @$); } diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index d02d6aab6..4a45bc357 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,10 +1,10 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-8EAQPI9 -// DateTime: 12.12.2016 11:36:36 -// UserName: ????????? -// Input file +// Machine: IVAN-PC +// DateTime: 18.12.2016 12:52:08 +// UserName: Ivan +// Input file // options: no-lines gplex @@ -56,7 +56,7 @@ public abstract class ScanBase : AbstractScanner { - // Verbatim content from J:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // Verbatim content from ABCPascal.y // ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg public syntax_tree_node root; // �������� ���� ��������������� ������ @@ -68,7 +68,7 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { } - // End verbatim content from J:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // End verbatim content from ABCPascal.y #pragma warning disable 649 private static Dictionary aliasses; @@ -5029,7 +5029,7 @@ public partial class GPPGParser: ShiftReduceParser