New contributor looking for feedback

Everything about development and the OpenMW source code.
Post Reply
User avatar
ampaulg
Posts: 2
Joined: 16 May 2019, 21:37
Gitlab profile: https://gitlab.com/ampaulg

New contributor looking for feedback

Post by ampaulg » 27 Jul 2019, 18:18

I was looking at issue 5097 as my first contribution, and had some ideas for how to fix it. Since this is my first time contributing I would like to ask for feedback on my plan.

There's a part in Scanner::scanName where it checks for whether the string is a keyword or not so that it can later call Parser::parseKeyword if necessary. I was thinking I could add onto this and also have checks for whether or not the name might actually be an int or float so that parseInt or parseFloat can get called.

But now it seems like scanName would be doing more work than it should because it would also become responsible for determining what the string is, so I think it may be better to have Scanner::scanToken not call scanName if something starts in quotation marks. It could instead call a new function to determine whether the token is a name/keyword/int/float and then call the appropriate parser function. The other scanName which is responsible for putting together the "name" may be renamed to scanQuotedText or something since it's necessary for things that are not necessarily names.

If there are any issues with this plan (or any suggestions for a cleaner/better way), I'd be glad to hear any comments.

clort
Posts: 4
Joined: 25 May 2019, 06:18

Re: New contributor looking for feedback

Post by clort » 04 Oct 2019, 21:12

I don't understand the issues involved and it's sad that nobody who does has answered you.

User avatar
akortunov
Posts: 621
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: New contributor looking for feedback

Post by akortunov » 05 Oct 2019, 05:49

There is already a pending fix for mentioned issue: https://github.com/OpenMW/openmw/pull/2539/

Post Reply