mattn / anko

Scriptable interpreter written in golang
http://play-anko.appspot.com/
MIT License
1.47k stars 118 forks source link

Require syntax document #74

Open deafwolf opened 7 years ago

deafwolf commented 7 years ago

As the title, the readme is too simple.

MarcusE1W commented 7 years ago

Have you noticed the examples in anko/_example/scripts/ ? Maybe that helps a bit?

AlekSi commented 7 years ago

Still, language specification would be very useful.

MichaelS11 commented 6 years ago

Was curious, what would this look like? Is there an example from another language like Go, JavaScript, Python, etc.?

AlekSi commented 6 years ago

Go language specification is a good example.

MichaelS11 commented 6 years ago

Yeah, having language specification would be very nice. I personally would like to see 95%+ code coverage testing first.

floren commented 6 years ago

@MichaelS11 It is hard to write tests without knowing that the expected behavior is. I agree, a language spec is important. I'm writing a description for the documentation of my own project, but in order to do it I'm having to dive into the anko codebase because the examples aren't sufficient. Right now I'm trying to figure out if it's possible to expand / append to a slice, and what precisely is the difference between a slice and an array anyway.

MichaelS11 commented 6 years ago

There is a lots still to do, including examples and language specifications. Anyone who would like to help, good PRs are excepted.

Until more examples are made for slices, I would suggest checking out the tests:

https://github.com/mattn/anko/blob/master/vm/vmArraysAndMaps_test.go

floren commented 6 years ago

A BNF syntax would be great, although it's been so long since I've written one that I'm not confident I could pull it off.