-
Notifications
You must be signed in to change notification settings - Fork 0
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
[NFC] Add more comments #8
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
=======================================
Coverage 90.78% 90.78%
=======================================
Files 1 1
Lines 228 228
=======================================
Hits 207 207
Misses 21 21 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great from what i've reviewed so far
i want to try to understand the details of the algorithms a bit better with the help of the new examples
@@ -429,22 +503,32 @@ function _find_newlines_quote_unaware_simd!(l::Lexer, buf::Vector{UInt8}, out::A | |||
end | |||
end | |||
|
|||
""" | |||
find_newlines!(l::Lexer, buf::Vector{UInt8}, out::AbstractVector{Int32}, curr_pos::Int=firstindex(buf), end_pos::Int=lastindex(buf)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be idiomatic for the argument being mutated out
to be the first argument.
Is there a reason to break from that idiom?
Can we open an issue to change to that, so we have
find_newlines!(out::AbstractVector{Int32}, l::Lexer, buf::Vector{UInt8}, curr_pos::Int=firstindex(buf), end_pos::Int=lastindex(buf))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right, but it does feel weird to me that the thing that impacts the implementation the most and that also gets mutated internally comes second... In an OO language, this would be Lexer.find_newlines(...)
, I think this is what throws me off.
Co-authored-by: Nick Robinson <[email protected]>
No description provided.