wenyan-lang/wenyan

Is there a plan to provide a language spec?

nanmu42 opened this issue Β· 12 comments

Hi,

It would be nice if the language specification can be provided, for example: https://golang.org/ref/spec, so that people may implement/port the language to the backend they like.

Very impressive work, I enjoy it a lot!

agree @nanmu42 , I want to implement other language, does it have doc or something like it?

Hi nanmu42 and jamfly,
Thanks! Indeed writing the spec is among my top priorities, I’m working on it and you can expect it in a couple of days. Will update here when done. :-)

Brilliant! Looking forward to it. πŸ‘

Great work!

Well done... possible towards a more practical one not so toyish like Rust? ;)

if_statement                : IF if_expression 'θ€…' statement+ (ELSE statement+)? FOR_IF_END ;

Should statement+ be statement* ?

@cuixiping Good catch!
@jiangzoi fix this XD

if_statement                : IF if_expression 'θ€…' statement+ (ELSE statement+)? FOR_IF_END ;

Should statement+ be statement* ?

Thank you for proposing this suggestion.
Let's see what will happen if statement+ is replaced by statement*:
θ‹₯γ€Œζ»ΏθΆ³ζ’δ»Άγ€θ€…γ€‚δΉŸ
Which does not make much sense from reading. That is why we consider to put statement+ here.

@jiangzoi

θ‹₯γ€Œζ»ΏθΆ³ζ’δ»Άγ€θ€…γ€‚
θ‹₯非
      do something
也

and why is statement * in for statements but if statement?
They should not be different.

antfu commented

Now available on https://wy-lang.org/spec

Is this completed? I find the grammar summary, but nothing about semantics, nor any rules of conformance.

  • 1
  • 2
  • 3
  • ok1
  • ok2