[fine] Environments for functions
Fun times.
This commit is contained in:
parent
308114f8cf
commit
efd0685f41
3 changed files with 81 additions and 3 deletions
30
fine/tests/expression/argument.fine
Normal file
30
fine/tests/expression/argument.fine
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue