Skip to content

Commit

Permalink
Мелкий рефакторинг в рассахаривателе условий
Browse files Browse the repository at this point in the history
Предупреждение -Wrepeated (bmstu-iu9#290) показало на избыточное сравнение с повторной
переменной. Оказалось, эту переменную передавать отдельно в функцию
UnCondition-Sentence нет никакой необходимости.
  • Loading branch information
Mazdaywik committed Mar 8, 2021
1 parent 48f7f04 commit 817b6c8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/compiler/Desugaring-UnCondition.ref
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ UnCondition-Unit-Sentence {
e.Name s.MarkupContext (s.SkipNo e.RemNames (e.NewFunctions)) (e.Sentence)
, e.Sentence : (e._) (Condition (e.ConditionName) (e._) (e._)) e._
= <AddSuffix e.Name ('*' s.SkipNo)> : e.RemName
= <UnCondition-Sentence
s.MarkupContext (e.ConditionName) (e.RemName) e.Sentence
>
= <UnCondition-Sentence s.MarkupContext (e.RemName) e.Sentence>
: (e.Sentence^) e.NewSentenceFunctions
= (
<Inc s.SkipNo> e.RemNames (e.RemName)
Expand Down Expand Up @@ -428,13 +426,11 @@ DoT0 {
}

/**
<UnCondition-Sentence
s.MarkupContext (e.ConditionName) (e.ContName) e.Sentence
>
<UnCondition-Sentence s.MarkupContext (e.ContName) e.Sentence>
== (e.TransformedSentence) e.SubFunctions
*/
UnCondition-Sentence {
s.MarkupContext (e.ConditionName) t.ContName e.Sentence
s.MarkupContext t.ContName e.Sentence
, e.Sentence
: (e.Pattern)
(Condition (e.ConditionName) (e.CondResult) (e.CondPattern))
Expand Down

0 comments on commit 817b6c8

Please sign in to comment.