A named parameter cannot be used for a house ID
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 58
- Forks
- 46
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 3
Description
A named parameter cannot be used for a house ID, instead throwing a Unrecognised identifier for the parameter name, for example:
house_id_1=5;
item(FEAT_HOUSES, item_house_1, house_id_1) {
...
}
Gives Unrecognised identifier for house_id_1. This seems like a bug:
"in theory it's supposed to work (https://github.com/OpenTTD/nml/blob/master/nml/ast/item.py#L55 looks for named params via https://github.com/OpenTTD/nml/blob/master/nml/global_constants.py#L1415), so it looks like a bug (but a hard to fix one I think"
"I guess it's similar to https://github.com/OpenTTD/nml/issues/299 check happens at parsing but the registration of house_id_1 is during preprocess step"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in the issue, then read nml/ast/item.py around named-parameter lookup and nml/global_constants.py around the referenced registration. Trace when house_id_1 is checked during parsing versus registered during preprocessing. Done means the example accepts the named house ID without an Unrecognised identifier error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100