[fine] Environments for functions

Fun times.
This commit is contained in:
John Doty 2024-01-07 08:09:43 -08:00
parent 308114f8cf
commit efd0685f41
3 changed files with 81 additions and 3 deletions

View file

@ -0,0 +1,30 @@
// @concrete:
// | File
// | FunctionDecl
// | Fun:'"fun"'
// | Identifier:'"foo"'
// | ParamList
// | LeftParen:'"("'
// | Parameter
// | Identifier:'"x"'
// | Colon:'":"'
// | TypeExpression
// | Identifier:'"f64"'
// | RightParen:'")"'
// | Block
// | LeftBrace:'"{"'
// | ExpressionStatement
// | BinaryExpression
// | Identifier
// | Identifier:'"x"'
// | Plus:'"+"'
// | LiteralExpression
// | Number:'"7"'
// | RightBrace:'"}"'
// |
fun foo(x: f64) {
x + 7
}
// @type: 613 f64