emdash / udlang

A practical, functional language for stream processing.
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Syntax: Allow or even mandate leading "|" in type unions. #23

Closed emdash closed 3 years ago

emdash commented 3 years ago

The current syntax understands only "|" as an operator. So, you must write

type Quux: Foo | Bar | Baz;

It actually makes more sense to write type unions like this, when spread across multiple lines:

type Quux:
   | Foo
   | Bar
   | Baz
;

FlowJS and other languages support this syntax, and uDLang should too.

emdash commented 3 years ago

This is fixed by PR #30