Also handle circular references in types and environments without exploding, and tweak test output a little bit.
31 lines
612 B
Text
31 lines
612 B
Text
// @concrete:
|
|
// | File
|
|
// | LetStatement
|
|
// | Let:'"let"'
|
|
// | Identifier:'"x"'
|
|
// | Equal:'"="'
|
|
// | LiteralExpression
|
|
// | Number:'"23"'
|
|
// | Semicolon:'";"'
|
|
// | LetStatement
|
|
// | Let:'"let"'
|
|
// | Identifier:'"y"'
|
|
// | Equal:'"="'
|
|
// | BinaryExpression
|
|
// | Identifier
|
|
// | Identifier:'"x"'
|
|
// | Star:'"*"'
|
|
// | LiteralExpression
|
|
// | Number:'"2"'
|
|
// | Semicolon:'";"'
|
|
// | ExpressionStatement
|
|
// | Identifier
|
|
// | Identifier:'"y"'
|
|
// | Semicolon:'";"'
|
|
// |
|
|
|
|
let x = 23;
|
|
let y = x * 2;
|
|
y;
|
|
|
|
// @type: 590 f64
|