[fine] More test!
This commit is contained in:
parent
40d611ae37
commit
2f8e1bad85
1 changed files with 56 additions and 19 deletions
|
|
@ -1,24 +1,61 @@
|
|||
true and false or false and !true;
|
||||
fun test() {
|
||||
true and false or false and !true
|
||||
}
|
||||
|
||||
// @no-errors
|
||||
// @compiles-to:
|
||||
// | function test (0 args, 0 locals):
|
||||
// | strings (0):
|
||||
// | code (15):
|
||||
// | 0: PushTrue
|
||||
// | 1: JumpFalse(4)
|
||||
// | 2: PushTrue
|
||||
// | 3: Jump(5)
|
||||
// | 4: PushFalse
|
||||
// | 5: JumpTrue(8)
|
||||
// | 6: PushTrue
|
||||
// | 7: Jump(14)
|
||||
// | 8: PushFalse
|
||||
// | 9: JumpFalse(12)
|
||||
// | 10: PushTrue
|
||||
// | 11: Jump(14)
|
||||
// | 12: PushTrue
|
||||
// | 13: BoolNot
|
||||
// | 14: Return
|
||||
// | function << module >> (0 args, 0 locals):
|
||||
// | strings (0):
|
||||
// | code (2):
|
||||
// | 0: PushNothing
|
||||
// | 1: Return
|
||||
// |
|
||||
// @eval: Bool(false)
|
||||
// @type: 15 bool
|
||||
// @concrete:
|
||||
// | File
|
||||
// | ExpressionStatement
|
||||
// | BinaryExpression
|
||||
// | BinaryExpression
|
||||
// | LiteralExpression
|
||||
// | True:'"true"'
|
||||
// | And:'"and"'
|
||||
// | LiteralExpression
|
||||
// | False:'"false"'
|
||||
// | Or:'"or"'
|
||||
// | BinaryExpression
|
||||
// | LiteralExpression
|
||||
// | False:'"false"'
|
||||
// | And:'"and"'
|
||||
// | UnaryExpression
|
||||
// | Bang:'"!"'
|
||||
// | LiteralExpression
|
||||
// | True:'"true"'
|
||||
// | Semicolon:'";"'
|
||||
// | FunctionDecl
|
||||
// | Fun:'"fun"'
|
||||
// | Identifier:'"test"'
|
||||
// | ParamList
|
||||
// | LeftParen:'"("'
|
||||
// | RightParen:'")"'
|
||||
// | 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:'"}"'
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue