2024-11-18 16:20:32 -06:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Result of parsing comparisons_multiple.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"end": 46,
|
|
|
|
"expression": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 18,
|
|
|
|
"left": {
|
|
|
|
"end": 13,
|
|
|
|
"left": {
|
|
|
|
"end": 8,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 7,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 3.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
"operator": "==",
|
|
|
|
"right": {
|
|
|
|
"end": 13,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 12,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 3.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
"start": 7,
|
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
},
|
|
|
|
"operator": "==",
|
|
|
|
"right": {
|
|
|
|
"end": 18,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 17,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 3.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
"start": 7,
|
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 45,
|
|
|
|
"raw": "\"this should not compile\"",
|
|
|
|
"start": 20,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "this should not compile"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 6,
|
|
|
|
"name": "assert",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 46,
|
|
|
|
"start": 0,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "ExpressionStatement",
|
|
|
|
"type": "ExpressionStatement"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 47,
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|