1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

infixContext doesn't work with comment in expression

Poor comments
This commit is contained in:
Timothy Clem 2017-09-01 11:32:32 -07:00
parent 176012b1d2
commit 22c0352205
8 changed files with 66 additions and 41 deletions

View File

@ -99,7 +99,6 @@ expression = term (handleError everything)
, case'
, class'
, conditional
, comment
, emptyStatement
, endBlock
, for
@ -356,7 +355,7 @@ unary = symbol Unary >>= \ location ->
-- TODO: Distinguish `===` from `==` ?
-- TODO: Distinuish `=~` and `!~` ?
binary :: Assignment
binary :: Assignment
binary = makeTerm' <$> symbol Binary <*> children (infixTerm expression expression
[ (inj .) . Expression.Plus <$ symbol AnonPlus
, (inj .) . Expression.Minus <$ symbol AnonMinus'

View File

@ -1,3 +1,5 @@
(Program
{+(Comment)+}
{-(Comment)-})
(Context
{+(Comment)+}
{-(Comment)-}
(Empty)))

View File

@ -1,3 +1,5 @@
(Program
{+(Comment)+}
{-(Comment)-})
(Context
{+(Comment)+}
{-(Comment)-}
(Empty)))

View File

@ -1,2 +1,4 @@
(Program
(Comment))
(Context
(Comment)
(Empty)))

View File

@ -1,2 +1,4 @@
(Program
(Comment))
(Context
(Comment)
(Empty)))

View File

@ -20,15 +20,21 @@
(Integer))-})
{-(Hash)-}
{-(Hash
(Comment)
(KeyValue
(Identifier)
(Integer))
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer))
(Comment))-}
(Context
(Comment)
(KeyValue
(Identifier)
(Integer)))
(Context
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer)))
(Context
(Comment)
(Empty)))-}
{-(Hash
(Comment))-})
(Context
(Comment)
(Empty)))-})

View File

@ -20,15 +20,21 @@
(Integer))+})
{+(Hash)+}
{+(Hash
(Comment)
(KeyValue
(Identifier)
(Integer))
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer))
(Comment))+}
(Context
(Comment)
(KeyValue
(Identifier)
(Integer)))
(Context
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer)))
(Context
(Comment)
(Empty)))+}
{+(Hash
(Comment))+})
(Context
(Comment)
(Empty)))+})

View File

@ -14,15 +14,21 @@
(Integer)))
(Hash)
(Hash
(Comment)
(KeyValue
(Identifier)
(Integer))
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer))
(Comment))
(Context
(Comment)
(KeyValue
(Identifier)
(Integer)))
(Context
(Comment)
(Comment)
(KeyValue
(TextElement)
(Integer)))
(Context
(Comment)
(Empty)))
(Hash
(Comment)))
(Context
(Comment)
(Empty))))