emdash / udlang

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

Extended Template Syntax #33

Open emdash opened 3 years ago

emdash commented 3 years ago

Idea: allow templates to consume multiple blocks, with keyword separators.

Template definition:

template foo() using bar, "with" baz, "from" quux {
  quux();
  baz();
  bar();
}

Template call:

foo() {
   out "a";
} with {
  out "b";
} from {
  out "c";
}

Output:

c
b
a

Not sure what kind of trouble this would make for the parser / lexer / etc.