Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 23733f9

Browse files
author
Patrick Thomson
authored
Merge branch 'master' into php-strict-equal-assignment
2 parents daacddc + cd232fb commit 23733f9

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

src/Data/Abstract/AccessControls/Instances.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ instance AccessControls1 PHP.IncludeOnce
398398
instance AccessControls1 PHP.ArrayElement
399399
instance AccessControls1 PHP.GlobalDeclaration
400400
instance AccessControls1 PHP.SimpleVariable
401+
instance AccessControls1 PHP.Concat
401402
instance AccessControls1 PHP.CastType
402403
instance AccessControls1 PHP.ErrorControl
403404
instance AccessControls1 PHP.Clone

src/Language/PHP/Assignment.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ type Syntax = '[
146146
, Syntax.ReturnType
147147
, Syntax.ScalarType
148148
, Syntax.ShellCommand
149+
, Syntax.Concat
149150
, Syntax.SimpleVariable
150151
, Syntax.Static
151152
, Syntax.Text
@@ -233,7 +234,7 @@ augmentedAssignmentExpression = makeTerm' <$> symbol AugmentedAssignmentExpressi
233234
, assign Expression.DividedBy <$ symbol AnonSlashEqual
234235
, assign Expression.Plus <$ symbol AnonPlusEqual
235236
, assign Expression.Minus <$ symbol AnonMinusEqual
236-
, assign Expression.Times <$ symbol AnonDotEqual
237+
, assign Syntax.Concat <$ symbol AnonDotEqual
237238
, assign Expression.LShift <$ symbol AnonLAngleLAngleEqual
238239
, assign Expression.RShift <$ symbol AnonRAngleRAngleEqual
239240
, assign Expression.BAnd <$ symbol AnonAmpersandEqual
@@ -266,7 +267,8 @@ binaryExpression = makeTerm' <$> symbol BinaryExpression <*> children (infixTerm
266267
, (inject .) . Expression.RShift <$ symbol AnonRAngleRAngle
267268
, (inject .) . Expression.Plus <$ symbol AnonPlus
268269
, (inject .) . Expression.Minus <$ symbol AnonMinus
269-
, (inject .) . Expression.Times <$ (symbol AnonStar <|> symbol AnonDot)
270+
, (inject .) . Expression.Times <$ symbol AnonStar
271+
, (inject .) . Syntax.Concat <$ symbol AnonDot
270272
, (inject .) . Expression.DividedBy <$ symbol AnonSlash
271273
, (inject .) . Expression.Modulo <$ symbol AnonPercent
272274
, (inject .) . Expression.InstanceOf <$ symbol AnonInstanceof

src/Language/PHP/Syntax.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ newtype SimpleVariable a = SimpleVariable { value :: a }
128128

129129
instance Evaluatable SimpleVariable
130130

131+
data Concat a = Concat { lhs :: a, rhs :: a }
132+
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Ord, Show, ToJSONFields1, Traversable, NFData1)
133+
deriving (Eq1, Show1, Ord1) via Generically Concat
134+
135+
instance Evaluatable Concat
136+
131137
-- | TODO: Unify with TypeScript's PredefinedType
132138
newtype CastType a = CastType { _castType :: T.Text }
133139
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Ord, Show, ToJSONFields1, Traversable, NFData1)

src/Tags/Taggable.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ instance Taggable PHP.IncludeOnce
551551
instance Taggable PHP.ArrayElement
552552
instance Taggable PHP.GlobalDeclaration
553553
instance Taggable PHP.SimpleVariable
554+
instance Taggable PHP.Concat
554555
instance Taggable PHP.CastType
555556
instance Taggable PHP.ErrorControl
556557
instance Taggable PHP.Clone

0 commit comments

Comments
 (0)