mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Make readonly' an Assignment
This commit is contained in:
parent
c78fe9d713
commit
e3a6de8d9e
@ -178,14 +178,15 @@ destructuringPattern = makeTerm <$> symbol ObjectPattern <*> (Literal.Hash <$> m
|
|||||||
spreadElement :: Assignment
|
spreadElement :: Assignment
|
||||||
spreadElement = symbol SpreadElement *> children expression
|
spreadElement = symbol SpreadElement *> children expression
|
||||||
|
|
||||||
readonly' = symbol Readonly *> children source
|
readonly' :: Assignment
|
||||||
|
readonly' = makeTerm <$> symbol Readonly <*> children (Syntax.Identifier <$> source)
|
||||||
|
|
||||||
methodDefinition :: Assignment
|
methodDefinition :: Assignment
|
||||||
methodDefinition = makeVisibility <$>
|
methodDefinition = makeVisibility <$>
|
||||||
symbol MethodDefinition
|
symbol MethodDefinition
|
||||||
<*> children ((,,,,,) <$> optional accessibilityModifier' <*> optional readonly' <*> emptyTerm <*> propertyName <*> callSignature <*> statements)
|
<*> children ((,,,,,) <$> optional accessibilityModifier' <*> optional readonly' <*> emptyTerm <*> propertyName <*> callSignature <*> statements)
|
||||||
where
|
where
|
||||||
makeVisibility loc (modifier, empty, readonly, propertyName, callSignature, statements) = maybe method'' (\x -> makeTerm loc (Type.Visibility (maybe method'' (const (makeReadonly loc method'')) readonly) x)) modifier
|
makeVisibility loc (modifier, readonly, empty, propertyName, callSignature, statements) = maybe method'' (\x -> makeTerm loc (Type.Visibility (maybe method'' (const (makeReadonly loc method'')) readonly) x)) modifier
|
||||||
where method'' = method' loc empty propertyName callSignature statements
|
where method'' = method' loc empty propertyName callSignature statements
|
||||||
|
|
||||||
method' loc term name signature statements = makeTerm loc (Declaration.Method term name signature statements)
|
method' loc term name signature statements = makeTerm loc (Declaration.Method term name signature statements)
|
||||||
|
Loading…
Reference in New Issue
Block a user