firescript
Version:
Firescript language
89 lines (88 loc) • 2.13 kB
JSON
{
"type": "ClassBody",
"body": [
{
"type": "MethodDefinition",
"key": {
"type": "Identifier",
"name": "constructor"
},
"computed": false,
"value": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "fruit"
}
},
"right": {
"type": "Literal",
"value": "banana",
"raw": "'banana'"
}
}
}
]
},
"generator": false,
"expression": false,
"async": false
},
"kind": "constructor",
"static": false
},
{
"type": "MethodDefinition",
"key": {
"type": "Identifier",
"name": "getFruit"
},
"computed": false,
"value": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "fruit"
}
}
}
]
},
"generator": false,
"expression": false,
"async": false
},
"kind": "method",
"static": false
}
]
}