diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 567aa29dc..6a8dae13c 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: DESKTOP-P4NLNB1 -// DateTime: 5/4/2020 10:24:40 AM +// DateTime: 5/5/2020 6:55:25 PM // UserName: fatco // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 1b8b39812..2643bae14 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-P4NLNB1 -// DateTime: 5/4/2020 10:24:41 AM +// DateTime: 5/5/2020 6:55:26 PM // UserName: fatco // Input file diff --git a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs index 923ed50c1..d492b08ea 100644 --- a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs @@ -59,6 +59,8 @@ namespace SyntaxVisitors.SugarVisitors el.Add(sl.step); return el; } + + /* public override void Exit(syntax_tree_node st) { if (st is slice_expr_question) @@ -68,15 +70,15 @@ namespace SyntaxVisitors.SugarVisitors { ProceedSliceExpr(st as slice_expr); } - // base.Exit(st); - } + }*/ + public override void visit(assign _assign) { - ProcessNode(_assign.from); - ProcessNode(_assign.to); + _assign.from.visit(this); + _assign.to.visit(this); } - public void ProceedSliceExpr(slice_expr sl) + public override void visit(slice_expr sl) { var el = construct_expression_list_for_slice_expr(sl); if (sl.Parent is assign parent_assign && parent_assign.to == sl) @@ -104,7 +106,7 @@ namespace SyntaxVisitors.SugarVisitors } } - public void ProceedSliceQuestionExpr(slice_expr_question sl) + public override void visit(slice_expr_question sl) { if (sl.Parent is assign parent_assign && parent_assign.to == sl) { diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index c93f682d9..49a2bebba 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -10387,7 +10387,7 @@ begin raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE)); if (situation = 0) or (situation = 1) then - if (&to < 0) or (&to > Len) then + if (&to < -1) or (&to > Len) then raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE)); if situation > 0 then