-1 теперь корректное значение для параметра to в SystemSlice

This commit is contained in:
Александр Погорелов 2020-05-05 18:58:06 +03:00
parent ec29e42978
commit 0253a47bed
4 changed files with 11 additions and 9 deletions

View file

@ -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 <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -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 <ABCPascal.y>

View file

@ -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)
{

View file

@ -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