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

Access syntax using index. #173

Closed

Conversation

noppefoxwolf
Copy link
Contributor

@noppefoxwolf noppefoxwolf commented Apr 10, 2020

Fixed iterator access using index as follows line.
It can be efficient allocate memory and access syntax using lazy and prefix.

let functionCallExpressionMap = Array(functionCallExpression.children.makeIterator().lazy.map({ $0 }).prefix(3))

@Jeehut Jeehut changed the base branch from feature/swift-syntax to main April 10, 2020 15:05
@Jeehut
Copy link
Member

Jeehut commented Apr 10, 2020

@noppefoxwolf Thank you very much for this subsequent PR, but you were a little too fast as I was still working on my PR, mainly fixing SwiftLint warnings to get the CI going. Now we have some merge conflicts here (I've changed the target branch to main because I already merged my PR), could you please fix them?

I think the main difference is the .makeIterator() call which I didn't put in there. Can you check if everything else is correct? I copied the code manually during the process before you posted this PR and then tried to adjust.

Feel free to also close this and start a new PR if you find that easier. Sorry for the inconvenience.

ドイツからのご挨拶!

Jeehut added a commit that referenced this pull request Apr 10, 2020
@Jeehut
Copy link
Member

Jeehut commented Apr 10, 2020

@noppefoxwolf I have just diffed the code from your branch and the main branch and applied any changes that were missing in c74ea0d. Closint this then, thank you very much for your efforts, will release a new version with this fix now. 👍

@Jeehut Jeehut closed this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants