1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +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))
(Empty)
(
(ScopeResolution
(Identifier)))
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(Empty)
(
(ScopeResolution
(Identifier))
(ScopeResolution
(Identifier)))
(Identifier))))
(Import
(ScopeResolution
(Identifier))
(Empty)
(Identifier)))

View File

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

View File

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

View File

@ -1,22 +1,32 @@
(Program
(
{-(Import
{-(Identifier)-}
{-(Empty)-}
{-(Empty)-})-}
(Import
{-(ScopeResolution
{-(Identifier)-})-}
(ScopeResolution
(Identifier))
{+(Let
{+(Identifier)+}
(Identifier)
(Empty)
(Empty))
{+(Import
{+(ScopeResolution
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+})
(Import
(Let
{ (Identifier)
->(Identifier) }
(ScopeResolution
{ (Identifier)
->(Identifier) }
(Identifier))
(Empty))
{+(
{+(Import
{+(ScopeResolution
{+(Identifier)+})+}))
{+(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
(Identifier)
(ScopeResolution
(Identifier))
(Empty)))
(Import
(Let
(Identifier)
(ScopeResolution
(Identifier)
(Identifier))
(Empty)
(Empty))
(Import
(ScopeResolution
(Identifier))))
(Identifier))
(Identifier)
(Empty)))
(
(Import
(ScopeResolution
(Identifier)
(Identifier))
(Identifier)
(Empty))
(Import
(Identifier)
(Empty)
(Empty))))

View File

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