Skip to content

Commit

Permalink
Добавлена проверка всех предложений для repeated-maybe (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
penachett committed Feb 28, 2021
1 parent 1023313 commit 6b79c57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/compiler/Checker.ref
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ PrepareMessage {
= 'Repeated variable ' s.Mode '.' e.Index ' in specialization pattern';

RepeatedVariable s.Mode e.Index
= 'Repeated variable ' s.Mode '.' e.Index ' in assignment';
= 'Repeated variable ' s.Mode '.' e.Index ' in assignment/last sentence';

RepeatedVariableMaybe s.Mode e.Index
= 'Maybe repeated variable ' s.Mode '.' e.Index ' in last sentence';
= 'Maybe repeated variable ' s.Mode '.' e.Index;

UnnamedVariableInSpecPattern s.Mode e.Index
= 'Unnamed variable ' s.Mode '.' e.Index ' can\'t appear '
Expand Down Expand Up @@ -781,7 +781,7 @@ CheckSentenceRec {
(e.ScopeVars) t.LastSentence
= <CheckSentence e.ScopeVars t.LastSentence LastSentence> ;
(e.ScopeVars) t.Sentence e.Sentences
= <CheckSentence e.ScopeVars t.Sentence>
= <CheckSentence e.ScopeVars t.Sentence NotLastSentence>
<CheckSentenceRec (e.ScopeVars) e.Sentences>;
(e.ScopeVars) /* предложений нет */ = /* пусто */ ;
}
Expand Down Expand Up @@ -945,8 +945,9 @@ ReplaceInterval {

WarningIdByFlag {
Assign = RepeatedVariable;
LastSentence = RepeatedVariableMaybe;
Condition = /* для условий предупреждения не выдаются */;
LastSentence = RepeatedVariable;
NotLastSentence = RepeatedVariableMaybe;
Condition = RepeatedVariableMaybe;
/* пусто */ = /* пусто */;
}

Expand Down
4 changes: 2 additions & 2 deletions src/compiler/ParseCmdLine.ref
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ PrintHelp {
' -Wpseudofunctions, -Wno-... - check/don\'t pseudofunction\n'
' correctness (enabled by default)\n'
' -Wrepeated, -Wno-... - check/don\'t repeated variables\n'
' in assignments (disabled by default)\n'
' in assignments/last sentences (disabled by default)\n'
' -Wrepeated-maybe, -Wno-... - check/don\'t repeated variables\n'
' in last sentences (disabled by default)\n'
' (disabled by default)\n'
' -Werror[=...], -Wno-error[=...] - treat/don\'t all or only provided\n'
' warning(s) as error(s)\n'
'-p, --prefix prefix-name\n'
Expand Down

0 comments on commit 6b79c57

Please sign in to comment.