oden/fine/tests/expression/argument.fine

40 lines
893 B
Text

fun foo(x: f64) {
x + 7
}
// @type: 20 f64
// @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:'"}"'
// |
// @compiles-to:
// | function foo (1 args, 0 locals):
// | strings (0):
// | code (3):
// | 0: LoadArgument(0)
// | 1: PushFloat(7.0)
// | 2: FloatAdd
// | function << module >> (0 args, 0 locals):
// | strings (0):
// | code (0):
// |