mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 17:10:22 +03:00
3c8d187be0
Partially fixes #120 Removes the distinction between headers and articles, streamlines the surface AST Changes affects lexers and parser
23 lines
352 B
Markdown
23 lines
352 B
Markdown
## Article
|
|
|
|
```catala
|
|
new scope S:
|
|
param f content int fun of int
|
|
param b content bool
|
|
param out content int
|
|
|
|
new scope R:
|
|
param s scope S
|
|
param r content int
|
|
|
|
scope S:
|
|
def f of x [| (x >= x) |] := x + x
|
|
def f of x [| not b |] := x * x
|
|
def b := false
|
|
def out := f of 5
|
|
|
|
scope R:
|
|
def s.f of x := x + x * x
|
|
def r := s.out
|
|
```catala
|