gs-events
Version:
883 lines • 19.4 kB
JSON
{
"type": "File",
"start": 0,
"end": 247,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 247,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 28
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "Event"
},
"name": "Event"
}
}
],
"source": {
"type": "StringLiteral",
"start": 18,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 27
}
},
"extra": {
"rawValue": "./Event",
"raw": "\"./Event\""
},
"value": "./Event"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * 定义事件侦听器对象的接口。\n * @interface\n * @since 1.0.0\n ",
"start": 30,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 85,
"end": 247,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 100,
"end": 247,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 15,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 106,
"end": 120,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 35
},
"identifierName": "IEventListener"
},
"name": "IEventListener",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 121,
"end": 247,
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 15,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 221,
"end": 244,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 27
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 221,
"end": 232,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 15
},
"identifierName": "handleEvent"
},
"name": "handleEvent",
"leadingComments": null
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 234,
"end": 239,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "event"
},
"name": "event"
}
],
"body": {
"type": "BlockStatement",
"start": 242,
"end": 244,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 27
}
},
"body": [],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * 处理一个事件对象。\n * @param {Event} event - 指定派发的事件对象。\n * @since 1.0.0\n ",
"start": 127,
"end": 216,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 7
}
}
}
]
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * 定义事件侦听器对象的接口。\n * @interface\n * @since 1.0.0\n ",
"start": 30,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * 定义事件侦听器对象的接口。\n * @interface\n * @since 1.0.0\n ",
"start": 30,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * 定义事件侦听器对象的接口。\n * @interface\n * @since 1.0.0\n ",
"start": 30,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * 处理一个事件对象。\n * @param {Event} event - 指定派发的事件对象。\n * @since 1.0.0\n ",
"start": 127,
"end": 216,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 7
}
}
}
],
"tokens": [
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Event",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 13,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 17
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./Event",
"start": 18,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 27
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
}
},
{
"type": "CommentBlock",
"value": "*\n * 定义事件侦听器对象的接口。\n * @interface\n * @since 1.0.0\n ",
"start": 30,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
},
{
"type": {
"label": "export",
"keyword": "export",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "export",
"start": 85,
"end": 91,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 6
}
}
},
{
"type": {
"label": "default",
"keyword": "default",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "default",
"start": 92,
"end": 99,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 14
}
}
},
{
"type": {
"label": "class",
"keyword": "class",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "class",
"start": 100,
"end": 105,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "IEventListener",
"start": 106,
"end": 120,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 35
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 121,
"end": 122,
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 37
}
}
},
{
"type": "CommentBlock",
"value": "*\n * 处理一个事件对象。\n * @param {Event} event - 指定派发的事件对象。\n * @since 1.0.0\n ",
"start": 127,
"end": 216,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "handleEvent",
"start": 221,
"end": 232,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 232,
"end": 233,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "event",
"start": 234,
"end": 239,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 22
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 240,
"end": 241,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 24
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 242,
"end": 243,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 26
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 243,
"end": 244,
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 27
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 244,
"end": 245,
"loc": {
"start": {
"line": 14,
"column": 27
},
"end": {
"line": 14,
"column": 28
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 246,
"end": 247,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 247,
"end": 247,
"loc": {
"start": {
"line": 15,
"column": 1
},
"end": {
"line": 15,
"column": 1
}
}
}
]
}