ID:1905933
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Some changes to dm.exe that would make life easier:

flag to suppress "loading ..." output in -l and -o, so we don't have to look for where the data actually starts.

-l and -o shouldn't compile the environment. I'd want these to run as quickly as possible, at present how slow they work on large code bases (especially just to list included files) make them not worth-while.

-o should print a standard format, xml or json or whatever can be easily parsed. Currently it prints some xml-like data which can't be read by conformant xml parsers, and html parsers can bite you in the back with its special handling of tags (since area tags are supposed to be self-closing).

-o bugs/problems:
text expressions in associative lists generate bad trees:
var/list/test = list("[1 + 1]" = "2")

/* becomes:
<var file=*>test
<val file=*>"2"</val>
</var>
</var>
*/


I don't know if there's a difference between /var/ and var/, but the former will not generate anything in the tree:
/var/list/test = list(1, 2, 3)

/* becomes:
// empty!
*/



There may be more tree generation issues, these are just the ones which I've caught immediately. In its current state I don't think dm.exe is of much value other than just compiling an environment, hopefully this can be changed.
Isn't /var/ going to make it a variable of datums?
Starting a line with a slash is the same as starting from global scope.
mob
/obj/ball
icon = 'ball.dmi'
var circumference = 32*PI

/var/const/PI = 3.14

Login()
new /obj/ball (src)


Only limitation is that you can't define/override procs if you did it inside a proc.
mob
Login()
/obj/ball
icon = 'ball.dmi'

New() // error
world << "ball created!"

new /obj/ball (src)


A variable of datum would be defined under /datum like so:
datum
var blah

mob
blah = "poop"


And of course, a variable of a particular datum would be defined as you'd expect:
my_datum
var bloop
In response to Clusterfack
Clusterfack wrote:
Isn't /var/ going to make it a variable of datums?

nope, it looks like it does some other weird things. it looks like prefacing top-level var definitions with the absolute path operator...somehow inserts the var definition with the stddef variables. which might explain why it doesn't show up with -o.



(per -code_tree)
Bugs really should be in a separate thread (each) in the Bug Reports forum.
It'd be nice if it outputted json.