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:
parent
176012b1d2
commit
22c0352205
@ -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'
|
||||
|
6
test/fixtures/ruby/comment.diffA-B.txt
vendored
6
test/fixtures/ruby/comment.diffA-B.txt
vendored
@ -1,3 +1,5 @@
|
||||
(Program
|
||||
{+(Comment)+}
|
||||
{-(Comment)-})
|
||||
(Context
|
||||
{+(Comment)+}
|
||||
{-(Comment)-}
|
||||
(Empty)))
|
||||
|
6
test/fixtures/ruby/comment.diffB-A.txt
vendored
6
test/fixtures/ruby/comment.diffB-A.txt
vendored
@ -1,3 +1,5 @@
|
||||
(Program
|
||||
{+(Comment)+}
|
||||
{-(Comment)-})
|
||||
(Context
|
||||
{+(Comment)+}
|
||||
{-(Comment)-}
|
||||
(Empty)))
|
||||
|
4
test/fixtures/ruby/comment.parseA.txt
vendored
4
test/fixtures/ruby/comment.parseA.txt
vendored
@ -1,2 +1,4 @@
|
||||
(Program
|
||||
(Comment))
|
||||
(Context
|
||||
(Comment)
|
||||
(Empty)))
|
||||
|
4
test/fixtures/ruby/comment.parseB.txt
vendored
4
test/fixtures/ruby/comment.parseB.txt
vendored
@ -1,2 +1,4 @@
|
||||
(Program
|
||||
(Comment))
|
||||
(Context
|
||||
(Comment)
|
||||
(Empty)))
|
||||
|
28
test/fixtures/ruby/hash.diffA-B.txt
vendored
28
test/fixtures/ruby/hash.diffA-B.txt
vendored
@ -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)))-})
|
||||
|
28
test/fixtures/ruby/hash.diffB-A.txt
vendored
28
test/fixtures/ruby/hash.diffB-A.txt
vendored
@ -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)))+})
|
||||
|
28
test/fixtures/ruby/hash.parseA.txt
vendored
28
test/fixtures/ruby/hash.parseA.txt
vendored
@ -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))))
|
||||
|
Loading…
Reference in New Issue
Block a user