1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Revert "Use the state nodes to indicate that we’ve advanced past nodes.."

This reverts commit b2485da5199703d48d11ccf6b2374712b5067ded.
This commit is contained in:
Rob Rix 2017-08-03 15:38:11 -04:00
parent f43c2a889c
commit fa87a249ad

View File

@ -215,15 +215,15 @@ spec = do
assignBy headF "hi" source (node Red 0 2 []) `shouldBe` Right "hi"
it "advances past the current node" $
stateNodes . snd <$> runAssignment headF "hi" source (makeState [ node Red 0 2 [] ])
snd <$> runAssignment headF "hi" source (makeState [ node Red 0 2 [] ])
`shouldBe`
Right []
Right (State 2 (Info.Pos 1 3) Nothing 1 [])
describe "children" $ do
it "advances past the current node" $
stateNodes . snd <$> runAssignment headF "a" (children (pure (Out ""))) (makeState [node Red 0 1 []])
snd <$> runAssignment headF "a" (children (pure (Out ""))) (makeState [node Red 0 1 []])
`shouldBe`
Right []
Right (State 1 (Info.Pos 1 2) Nothing 1 [])
it "matches if its subrule matches" $
() <$ runAssignment headF "a" (children red) (makeState [node Blue 0 1 [node Red 0 1 []]])