DavidKinder / Inform6

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

Use ebf_curtoken_error() #219

Closed erkyrath closed 1 year ago

erkyrath commented 1 year ago

Changed a zillion instances of ebf_error("foo", token_text) to ebf_curtoken_error("foo").

ebf_error_recover(), in directs.c, always uses ebf_curtoken_error().

ebf_curtoken_error() is smart(-ish) about displaying what token_text says.

Global "foo";
Global 'bar';
Global 'x';
Global 123;

line 4: Error: Expected new global variable name but found string "foo" line 5: Error: Expected new global variable name but found dict word 'bar' line 6: Error: Expected new global variable name but found char 'x' line 7: Error: Expected new global variable name but found 123

Covers https://github.com/DavidKinder/Inform6/issues/213 .