SpacemanDMM
SpacemanDMM copied to clipboard
Parser chokes on paths containing "operator"
It is perhaps unwise to include operator
in a path, but BYOND accepts it.
/datum/operator
/datum/operator/proc/test()
This emits a warning that the proc is relatively-pathed, and confuses the language server into thinking the proc is global. If you leave out the first line, it also emits a "bad parent type" error.
/datum/test/proc/test(datum/operator/thing)
This causes a fatal error in the parser.
It would not be unreasonable to just treat operator
as a reserved word and disallow its use in paths. OpenDream does this by default. It shouldn't break the parser, though.
Unfortunately it's difficult to adapt the parser to allow both of the following to work:
/datum/operator/()
// this is the overload for `/` division operator for `/datum`
/datum/operator/unrelated_proc()
// this is an unrelated proc on `/datum/operator`
So I may leave this as a won't-fix.