42 lines
931 B
Text
42 lines
931 B
Text
fun foo(x: f64) {
|
|
x + 7
|
|
}
|
|
|
|
// @no-errors
|
|
// @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 (1):
|
|
// | 0: PushNothing
|
|
// |
|