mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Revert "Don't wrap a VarAssignment in a VarDecl"
This reverts commit 2b39a7cc0576675f0104f67a00df799b6f9ef970.
This commit is contained in:
parent
cbb31dd42a
commit
531524f29c
@ -163,11 +163,8 @@ termConstructor source sourceSpan name range children _ = case name of
|
||||
assignments' <- sequenceA $ zipWith (\id expr ->
|
||||
withCategory VarAssignment $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap expressionList)
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
[idList] | category (extract idList) == VarAssignment -> do
|
||||
withCategory ExpressionStatements (S.Indexed [idList])
|
||||
[idList] -> do
|
||||
varDecls <- mapM (withDefaultInfo . S.VarDecl) (toList $ unwrap idList)
|
||||
withDefaultInfo (S.Indexed varDecls)
|
||||
withDefaultInfo (S.Indexed [idList])
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
|
||||
withRanges originalRange category' terms syntax = do
|
||||
@ -221,5 +218,4 @@ categoryForGoName = \case
|
||||
"map_type" -> DictionaryTy
|
||||
"array_type" -> ArrayTy
|
||||
"implicit_length_array_type" -> ArrayTy
|
||||
"const_declaration" -> VarDecl
|
||||
s -> Other (toS s)
|
||||
|
Loading…
Reference in New Issue
Block a user