diff --git a/src/compiler/Checker.ref b/src/compiler/Checker.ref index d4065725..87b68d75 100644 --- a/src/compiler/Checker.ref +++ b/src/compiler/Checker.ref @@ -786,9 +786,9 @@ CheckSentenceRec { } CheckSentence { - e.ScopeVars ((e.Pattern) e.Assignments (e.Result) (e.Blocks)) e.Marker + e.ScopeVars ((e.Pattern) e.Assignments (e.Result) (e.Blocks)) e.Flag - = + = : (e.ScopeVars^) e.PatternFunctionsAndErrors = @@ -872,15 +872,52 @@ CheckPattern { (e.ScopeVars) (e.Pattern) e.Flag = + (e.Pattern) > >; } CheckPattern-WarnRepeated { - (e.ScopeVars) (e.Pattern) s.WarningId = ; - (e._) (e._) = /* пусто */; + (e.ScopeVars) s.WarningId (e.Pattern) + = ; + (e._) (e._) = /* не нужно проверять */; +} + +CheckPattern-WarnRepeatedRec { + (e.ScopeVars) s.WarningId + (e.B (TkVariable t.Pos 'e' e.Index) e.M (TkVariable t.Pos2 'e' e.Index2) e.E) + = + >; + e.Any = /* временная заглушка */; +} + + +ReducePattern { + e.Pattern + = : t.LastE + = ; +} + +FindLastE { + e.Pattern + = +} + +ReplaceInterval { + t.LastElem e.B (TkVariable t.Pos 'e' e.Index) e.M t.LastElem e.E + = e.B (TkVariable t.Pos 'e' '_') e.E; } GetWarningIdByFlag { @@ -889,6 +926,10 @@ GetWarningIdByFlag { /* пусто */ = /* пусто */; } +CheckVariableRepeating { + e._ = ; +} + CheckPattern-Flatten { (e.ScopeVars) e.Items-B (TkNewVariable t.SrcPos s.Mode '_' e.Index) e.Items-E =