Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved code of PsiContainer #935

Merged
merged 2 commits into from Jul 2, 2019

Conversation

@ice1000
Copy link
Contributor

commented Jun 18, 2019

This is how we write codes in Kotlin.

Additions

N/A, but possibly a bug-fix, will comment soon to explain

Changes

N/A

Backwards incompatible changes

N/A

element = element.nextSibling
}
}
fun elements() = generateSequence(start) { it.nextSibling?.takeIf { it != end } }

This comment has been minimized.

Copy link
@ice1000

ice1000 Jun 18, 2019

Author Contributor

Will generate a lazy sequence, end when it.nextSibling is null or it == end

override fun accept(visitor: PsiElementVisitor) = iterateElements {
start.accept(visitor)
}
override fun accept(visitor: PsiElementVisitor) = elements().forEach { it.accept(visitor) }

This comment has been minimized.

Copy link
@ice1000

ice1000 Jun 18, 2019

Author Contributor

"Bug fix".

@HannahSchellekens
Copy link
Member

left a comment

Agree on everything. Let's say you'll learn a lot in a few years ;)

@HannahSchellekens HannahSchellekens changed the title Kotlin programming Improved code of PsiContainer Jun 18, 2019

@ice1000

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

Any updates?

@PHPirates

This comment has been minimized.

Copy link
Collaborator

commented Jun 30, 2019

Please resolve merge conflicts.

@ice1000

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

Please resolve merge conflicts.

Done.

@HannahSchellekens HannahSchellekens merged commit efa98db into Hannah-Sten:master Jul 2, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ice1000 ice1000 deleted the ice1000:kt branch Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.