Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Adds swift example. EXPR might not be 100% valid #28

Merged
merged 4 commits into from
Aug 26, 2016
Merged

Adds swift example. EXPR might not be 100% valid #28

merged 4 commits into from
Aug 26, 2016

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Aug 26, 2016

If I really cared, I would substitute EXPR with what is a valid expression
according to the swift grammar, but I think this conveys the general idea.

Address #26.

Examples:

(venv)~/github/undebt (add-swift-example) $ echo "if let x = a where x == y {" | undebt -p undebt/examples/swift.py
if let x = a, x == y {
(venv)~/github/undebt (add-swift-example) $ echo "if let x = a, y = b, z = c where x == y && y != z {" | undebt -p undebt/examples/swift.py
if let x = a, let y = b, let z = c, x == y && y != z {
(venv)~/github/undebt (add-swift-example) $ echo "if let x = a + 1 where x == y {" | undebt -p undebt/examples/swift.py
if let x = a + 1, x == y {

If I really cared, I would substitute EXPR with what is a valid expression
according to the swift grammar, but I think this conveys the general idea.
@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage decreased (-2.6%) to 94.19% when pulling 7b39e29 on ajm188:add-swift-example into c5c97fd on Yelp:master.

@ajm188
Copy link
Contributor Author

ajm188 commented Aug 26, 2016

Well, I guess I should add those examples as tests, huh? 😛

@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage increased (+0.1%) to 96.888% when pulling 1b2771a on ajm188:add-swift-example into c5c97fd on Yelp:master.

@evhub
Copy link
Contributor

evhub commented Aug 26, 2016

@ajm188 Looking good! Do you think it would be a good idea to add this as another entry on the examples documentation page?

@ajm188
Copy link
Contributor Author

ajm188 commented Aug 26, 2016

@evhub yeah, since it will help answer the general "does this work for my language" questions :) i'll get right on it

@evhub
Copy link
Contributor

evhub commented Aug 26, 2016

@ajm188 LGTM!

@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage increased (+0.1%) to 96.888% when pulling 1cad3dd on ajm188:add-swift-example into c5c97fd on Yelp:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 96.888% when pulling 1cad3dd on ajm188:add-swift-example into c5c97fd on Yelp:master.

@ajm188 ajm188 merged commit c6427f5 into Yelp:master Aug 26, 2016
@ajm188 ajm188 deleted the add-swift-example branch August 26, 2016 23:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants