OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

weird `}` at end of line causing parse failure

Open ZeWaka opened this issue 1 year ago • 1 comments

it can't handle this:

/typeinfo/obj/machinery/conveyor_switch {
    mats = list("metal" = 10,
                "conductive" = 10,
                "crystal" = 10)}

/obj/machinery/conveyor_switch

but it can handle this with the extra newline:

/typeinfo/obj/machinery/conveyor_switch {
    mats = list("metal" = 10,
                "conductive" = 10,
                "crystal" = 10)
}

/obj/machinery/conveyor_switch

the original preproc dump:

/obj/machinery/conveyor_switch/typeinfo_type = /typeinfo/obj/machinery/conveyor_switch; /obj/machinery/conveyor_switch/get_typeinfo() { ; return get_singleton(src.typeinfo_type); } /typeinfo/obj/machinery/conveyor_switch; /typeinfo/obj/machinery/conveyor_switch/New(){ . = ..(); admin_procs += list(/obj/machinery/conveyor_switch/proc/trigger); }
/obj/machinery/conveyor_switch/typeinfo_type = /typeinfo/obj/machinery/conveyor_switch; /obj/machinery/conveyor_switch/get_typeinfo() { ; return get_singleton(src.typeinfo_type); } /typeinfo/obj/machinery/conveyor_switch {
    mats = list("metal" = 10,
                "conductive" = 10,
                "crystal" = 10)}
/obj/machinery/conveyor_switch
    name = "conveyor switch"
    desc = "A conveyor control switch."

perhaps related to https://github.com/OpenDreamProject/OpenDream/issues/512

ZeWaka avatar Jun 02 '24 06:06 ZeWaka