-
Notifications
You must be signed in to change notification settings - Fork 156
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
test 3 #1088
base: master
Are you sure you want to change the base?
test 3 #1088
Conversation
((tokens[i + 2].0 == ']' and | ||
# with a string literal(?) or a positive number.. | ||
# Q: why this exact check order should matter? | ||
(tokens[i + 1].1.0 == '"' or |
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.
"abc"[0 to 3]
IIRC compiles to something different than ("abc")[0 to 3]
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.
started debugger with "abc"[0 to 3]
and got these tokens:
0: (4) ["NEWLINE", "↵", 0, 0, eol: true, spaced: true]
1: (4) ["STRNUM", ""abc"", 1, 5]
2: (4) ["DOT", ".", 1, 5]
3: (4) ["[", "[", 1, 5]
4: (4) ["RANGE", "0", 1, 6, spaced: true, op: "to"]
5: (4) ["STRNUM", "3", 1, 11]
6: (4) ["]", "]", 1, 12, eol: true, spaced: true, index: true]
7: (4) ["NEWLINE", "↵", 3, 0, spaced: true]
at i == 4... so it checks '3' === '"'
...
Hey, @vendethiel does it take long for approval? Or how this works) and, I'll maybe move to another bug issue from this.. |
Hey @determin1st, thanks for jumping in! The first thing to get straight is whether or not this change is even desired. From my cursory review of #349, I'm not convinced that any proposed change is obviously right. I do think that the issue originally reported is something that merits fixing, so something should be done, but I don't have an opinion on what yet. Convince me you're right, or resume the conversation in #349 to get more of a consensus. The second thing is, and I don't mean to discourage you, but this and #1086 are both terrible PRs for at least the following reasons:
There may be other issues with the implementation here; I don't know, because I don't think it's worth my time to review this PR in this state. Get consensus on the desired effect, fix the above glaring issues, and then we can start talking about approval. The above may sound harsh, but I'm not trying to push you away. Please believe me when I say that I would love for you to be making quality contributions to LiveScript's code; and once you start doing so, I will be happy to review and accept them. But there is either a learning or an effort gap that you need to cross in order to get there, and I won't compromise on that. If you're new to contributing to GitHub projects, you might want to look around on the web for resources in your native language about how to submit good pull requests. You should also be or get familiar enough with Git that you can rebase and amend commits to polish them up into an acceptable state. |
Well, thanks for explanation. My concern, that Issues with "Bug" label are hard to traverse. Some of them have no decisions or no good examples to start from.. How to find some ready-for-implementation thing? Changes in this PR may be reduced to 4 lines: and with some comments inserted, i hope, it's clear what they do. Other reformattings were done because.. hmm.. territorial marking thing. I feel that code becomes my own code and it helps me better understand the logic involved.. So, it can't be totally undone in a long run. I'm okay with rewinding and throwing away first commit, no problem. Tests? Fully agree, is a must for such a project (they showed that my first attempt failed and required a As you won't compromize, lets pause/cancel this until either, I adapt or You trade. 🤝 |
I think, it fixes:
#349