mirror of
https://github.com/github/semantic.git
synced 2024-12-24 07:25:44 +03:00
Fix augmented assignment in Go
This commit is contained in:
parent
80ab58bd7f
commit
5d271a8f49
@ -454,7 +454,7 @@ assignment' = makeTerm' <$> symbol AssignmentStatement <*> children (infixTerm
|
||||
assign l r = inject (Statement.Assignment [] l r)
|
||||
|
||||
augmentedAssign :: (f :< Go.Syntax) => (Term Loc -> Term Loc -> f (Term Loc)) -> Term Loc -> Term Loc -> Sum Go.Syntax (Term Loc)
|
||||
augmentedAssign c l r = assign l (makeTerm1 (c l r))
|
||||
augmentedAssign c l r = inject (Statement.AugmentedAssignment (makeTerm1 (c l r)))
|
||||
|
||||
invert cons a b = Expression.Not (makeTerm1 (cons a b))
|
||||
|
||||
|
@ -104,6 +104,7 @@ type Syntax =
|
||||
, Literal.Reference
|
||||
, Literal.TextElement
|
||||
, Statement.Assignment
|
||||
, Statement.AugmentedAssignment
|
||||
, Statement.Break
|
||||
, Statement.Continue
|
||||
, Statement.For
|
||||
|
Loading…
Reference in New Issue
Block a user