66 lines
1.6 KiB
Text
66 lines
1.6 KiB
Text
fun test() -> bool {
|
|
true and false or false and !true
|
|
}
|
|
|
|
// @no-errors
|
|
// @compiles-to:
|
|
// | function << module >> (0 args, 0 locals):
|
|
// | strings (0):
|
|
// | code (2):
|
|
// | 0: PushNothing
|
|
// | 1: Return
|
|
// | function test (0 args, 0 locals):
|
|
// | strings (0):
|
|
// | code (15):
|
|
// | 0: PushTrue
|
|
// | 1: JumpTrue(4)
|
|
// | 2: PushFalse
|
|
// | 3: Jump(5)
|
|
// | 4: PushFalse
|
|
// | 5: JumpFalse(8)
|
|
// | 6: PushTrue
|
|
// | 7: Jump(14)
|
|
// | 8: PushFalse
|
|
// | 9: JumpTrue(12)
|
|
// | 10: PushFalse
|
|
// | 11: Jump(14)
|
|
// | 12: PushTrue
|
|
// | 13: BoolNot
|
|
// | 14: Return
|
|
// |
|
|
// @eval: Bool(false)
|
|
// @type: 15 bool
|
|
// @concrete:
|
|
// | File
|
|
// | FunctionDecl
|
|
// | Fun:'"fun"'
|
|
// | Identifier:'"test"'
|
|
// | ParamList
|
|
// | LeftParen:'"("'
|
|
// | RightParen:'")"'
|
|
// | ReturnType
|
|
// | Arrow:'"->"'
|
|
// | TypeExpression
|
|
// | TypeIdentifier
|
|
// | Identifier:'"bool"'
|
|
// | Block
|
|
// | LeftBrace:'"{"'
|
|
// | ExpressionStatement
|
|
// | BinaryExpression
|
|
// | BinaryExpression
|
|
// | LiteralExpression
|
|
// | True:'"true"'
|
|
// | And:'"and"'
|
|
// | LiteralExpression
|
|
// | False:'"false"'
|
|
// | Or:'"or"'
|
|
// | BinaryExpression
|
|
// | LiteralExpression
|
|
// | False:'"false"'
|
|
// | And:'"and"'
|
|
// | UnaryExpression
|
|
// | Bang:'"!"'
|
|
// | LiteralExpression
|
|
// | True:'"true"'
|
|
// | RightBrace:'"}"'
|
|
//
|