hundredrabbits / Ronin

Experimental Graphics Terminal
https://hundredrabbits.github.io/Ronin/
Other
1.2k stars 68 forks source link

Defining an associative array gets "Lain: Invalid definition" error #129

Open unsigned-nerd opened 4 years ago

unsigned-nerd commented 4 years ago

When I define an associative array like this:

(def prev-pos {:x 0 :y 0})

and evaluate it, I get "Lain: Invalid definition" error.

It is raised by line 137 of index.html:

if (input.length !== 3) { console.warn('Lain', 'Invalid definition.'); return }

My platform is

Notes

neauoire commented 4 years ago

This, {:x 0 :y 0}, is not valid lain syntax, where did you find this in the docs?

neauoire commented 4 years ago

Ah! Found it.

I will update the example, but this is not supported anymore. In the meantime, you can simply use:

(def p:x 10)
(def p:y 20)
(echo p)