1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Fix up Python tests for new structure of Import

This commit is contained in:
Timothy Clem 2018-01-15 20:14:50 -07:00
parent 9b3cc349d3
commit ea5d7437d4
9 changed files with 152 additions and 103 deletions

View File

@ -169,9 +169,9 @@ expressionChoices =
]
expressions :: Assignment
expressions = mk <$> location <*> manyTerm expression
where mk _ [child] = child
mk location children = makeTerm location children
expressions = makeTerm <$> location <*> manyTerm expression
-- where mk _ [child] = child
-- mk location children = makeTerm location children
expressionStatement :: Assignment
expressionStatement = mk <$> symbol ExpressionStatement <*> children (someTerm expression)

View File

@ -1,22 +1,28 @@
(Program
(Import
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
{+(ScopeResolution
{+(Identifier)+})+})
(Import
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))
{+(ScopeResolution
{+(Identifier)+})+})
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(
(ScopeResolution
{ (Identifier)
->(Identifier) })))
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
{+(ScopeResolution
{+(Identifier)+})+}))
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(Identifier)))

View File

@ -1,22 +1,28 @@
(Program
(Import
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
{+(ScopeResolution
{+(Identifier)+})+})
(Import
{+(ScopeResolution
{+(Identifier)+})+}
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))
{-(ScopeResolution
{-(Identifier)-})-})
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(
(ScopeResolution
{ (Identifier)
->(Identifier) })))
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(
{+(ScopeResolution
{+(Identifier)+})+}
(ScopeResolution
(Identifier))
{-(ScopeResolution
{-(Identifier)-})-}))
(Import
(ScopeResolution
{ (Identifier)
->(Identifier) })
(Empty)
(Identifier)))

View File

@ -2,16 +2,21 @@
(Import
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Empty)
(
(ScopeResolution
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Empty)
(
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(Empty)
(Identifier)))

View File

@ -2,16 +2,21 @@
(Import
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Empty)
(
(ScopeResolution
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Empty)
(
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(Empty)
(Identifier)))

View File

@ -1,22 +1,32 @@
(Program
(Import
{+(ScopeResolution
{+(Identifier)+})+}
(ScopeResolution
(Identifier))
{-(Let
{-(Identifier)-}
(
{+(Import
{+(Identifier)+}
{+(Empty)+}
{+(Empty)+})+}
(Import
(Identifier)
(Empty)
(Empty))
{-(Import
{-(ScopeResolution
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-})
(Import
(Let
{ (Identifier)
->(Identifier) }
(ScopeResolution
{ (Identifier)
->(Identifier) }
(Identifier))
(Empty))
{-(ScopeResolution
{-(Identifier)-})-}))
{+(Import
{+(ScopeResolution
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+}
{-(
{-(Import
{-(ScopeResolution
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-}
{-(Import
{-(Identifier)-}
{-(Empty)-}
{-(Empty)-})-})-})

View File

@ -1,22 +1,32 @@
(Program
(Import
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
{+(Let
{+(Identifier)+}
(
{-(Import
{-(Identifier)-}
{-(Empty)-}
{-(Empty)-})-}
(Import
(Identifier)
(Empty)
(Empty))
{+(Import
{+(ScopeResolution
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+})
(Import
(Let
{ (Identifier)
->(Identifier) }
(ScopeResolution
{ (Identifier)
->(Identifier) }
(Identifier))
(Empty))
{+(ScopeResolution
{+(Identifier)+})+}))
{+(
{+(Import
{+(ScopeResolution
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+}
{+(Import
{+(Identifier)+}
{+(Empty)+}
{+(Empty)+})+})+}
{-(Import
{-(ScopeResolution
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-})

View File

@ -1,18 +1,22 @@
(Program
(Import
(ScopeResolution
(Identifier))
(Let
(
(Import
(Identifier)
(Empty)
(Empty))
(Import
(ScopeResolution
(Identifier))
(Empty)))
(Import
(Let
(Identifier)
(Empty)))
(
(Import
(ScopeResolution
(Identifier)
(Identifier))
(Identifier)
(Empty))
(ScopeResolution
(Identifier))))
(Import
(Identifier)
(Empty)
(Empty))))

View File

@ -1,13 +1,16 @@
(Program
(Import
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Import
(Let
(
(Import
(Identifier)
(ScopeResolution
(Identifier)
(Identifier))
(Empty))))
(Empty)
(Empty))
(Import
(Identifier)
(Empty)
(Empty)))
(Import
(ScopeResolution
(Identifier)
(Identifier))
(Identifier)
(Empty)))