DavidKinder / Inform6

The latest version of the Inform 6 compiler, used for generating interactive fiction games.
http://inform-fiction.org/
Other
199 stars 32 forks source link

Verb clash -- detect and report error #287

Closed erkyrath closed 2 months ago

erkyrath commented 2 months ago

This PR is built on https://github.com/DavidKinder/Inform6/pull/286 . It will be easier to read if you merge that one first.

When parsing the Verb and Extend directives, we now convert strings to dict words before searching or comparing them.

The routines dictionary_set_verb_number(), find_verb(), renumber_verb() therefore now take int arguments instead of char*.

get_verb() is renamed get_existing_verb() and now optionally returns a dict word as well as a verb number.

https://github.com/erkyrath/Inform6-Testing/blob/verbclash2/src/verbclash.inf contains various test cases.

This finishes off https://github.com/DavidKinder/Inform6/issues/285 , unless we want to do the "implicit Extend" thing. I haven't heard back from Graham about that yet.