php-kilo/tests/__snapshots__/EditorTest__testOpen__1.json

2087 lines
40 KiB
JSON
Raw Normal View History

2019-11-20 15:03:48 -05:00
{
"rows": [
{
"render": "\/**",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2,
2
],
"idx": 0
2019-11-20 15:03:48 -05:00
},
{
"render": " * Interfaces for PHP FFI",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2019-11-20 15:03:48 -05:00
2
],
"idx": 1
},
{
"render": " *",
"hl": [
2,
2
],
"idx": 2
2019-11-20 15:03:48 -05:00
},
{
"render": " * Most of the structure code is cribbed from GLib",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2019-11-20 15:03:48 -05:00
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 3
2019-11-20 15:03:48 -05:00
},
{
"render": " *",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2
],
"idx": 4
},
{
"render": " * Defines are not (generally) recognized by the FFI integration",
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2019-11-20 15:03:48 -05:00
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 5
2019-11-20 15:03:48 -05:00
},
{
"render": " *\/",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2,
2
2019-11-20 15:03:48 -05:00
],
"idx": 6
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 7
2019-11-20 15:03:48 -05:00
},
{
"render": "\/\/ PHP 'constants' for FFI integration",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 8
},
{
"render": "\/\/ These seem to be the only define statements supported by the FFI integration",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 9
},
{
"render": "#define FFI_SCOPE \"terminal\"",
"hl": [
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
],
"idx": 10
},
{
"render": "#define FFI_LIB \"libc.so.6\"",
"hl": [
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
],
"idx": 11
},
{
"render": "",
"hl": [],
"idx": 12
},
{
"render": "\/\/ Nonsense for a test with a single quote",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 13
},
{
"render": "\/\/ Ignored by PHP due to the octothorpe (#)",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 14
},
{
"render": "#if 0",
"hl": [
4,
4,
4,
0,
6
],
"idx": 15
},
{
"render": "# char* x = \"String with \\\" escape char\";",
"hl": [
0,
0,
0,
0,
0,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
0
],
"idx": 16
},
{
"render": "# char y = 'q';",
"hl": [
0,
0,
0,
0,
0,
4,
4,
4,
4,
0,
0,
0,
0,
0,
5,
5,
5,
0
],
"idx": 17
},
{
"render": "#endif",
"hl": [
4,
4,
4,
4,
4,
4
],
"idx": 18
},
{
"render": "",
"hl": [],
"idx": 19
},
{
"render": "\/\/ -----------------------------------------------------------------------------",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 20
},
{
"render": "\/\/! <termios.h>",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 21
},
{
"render": "\/\/ -----------------------------------------------------------------------------",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 22
},
{
"render": "",
"hl": [],
"idx": 23
},
{
"render": "\/* Type of terminal control flag masks. *\/",
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 24
},
{
"render": "typedef unsigned long int tcflag_t;",
"hl": [
3,
3,
3,
3,
3,
3,
3,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
4,
4,
4,
4,
0,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 25
},
{
"render": "",
"hl": [],
"idx": 26
},
{
"render": "\/* Type of control characters. *\/",
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 27
},
{
"render": "typedef unsigned char cc_t;",
2019-11-20 15:03:48 -05:00
"hl": [
3,
3,
3,
3,
3,
3,
2019-11-20 15:03:48 -05:00
3,
0,
4,
4,
4,
4,
4,
4,
4,
4,
2019-11-20 15:03:48 -05:00
0,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 28
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 29
2019-11-20 15:03:48 -05:00
},
{
"render": "\/* Type of baud rate specifiers. *\/",
2019-11-20 15:03:48 -05:00
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2019-11-20 15:03:48 -05:00
2,
2,
2
],
"idx": 30
2019-11-20 15:03:48 -05:00
},
{
"render": "typedef long int speed_t;",
2019-11-20 15:03:48 -05:00
"hl": [
3,
3,
3,
3,
3,
3,
3,
0,
4,
4,
4,
4,
2019-11-20 15:03:48 -05:00
0,
4,
4,
4,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 31
},
{
"render": "",
"hl": [],
"idx": 32
},
{
"render": "\/* Terminal control structure. *\/",
"hl": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 33
},
{
"render": "struct termios",
"hl": [
2019-11-20 15:03:48 -05:00
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 34
},
{
"render": "{",
"hl": [
0
],
"idx": 35
},
{
"render": " \/* Input modes. *\/",
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 36
},
{
"render": " tcflag_t c_iflag;",
"hl": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 37
},
{
"render": "",
"hl": [],
"idx": 38
},
{
"render": " \/* Output modes. *\/",
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 39
},
{
"render": " tcflag_t c_oflag;",
"hl": [
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 40
},
{
"render": "",
"hl": [],
"idx": 41
},
{
"render": " \/* Control modes. *\/",
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 42
},
{
"render": " tcflag_t c_cflag;",
"hl": [
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 43
},
{
"render": "",
"hl": [],
"idx": 44
2019-11-20 15:03:48 -05:00
},
{
"render": " \/* Local modes. *\/",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
2019-11-20 15:03:48 -05:00
],
"idx": 45
2019-11-20 15:03:48 -05:00
},
{
"render": " tcflag_t c_lflag;",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 46
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 47
2019-11-20 15:03:48 -05:00
},
{
"render": " \/* Control characters. *\/",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 48
},
{
"render": " cc_t c_cc[20];",
"hl": [
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
6,
6,
2019-11-20 15:03:48 -05:00
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 49
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 50
2019-11-20 15:03:48 -05:00
},
{
"render": " \/* Input and output baud rates. *\/",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 51
},
{
"render": " speed_t __ispeed, __ospeed;",
"hl": [
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 52
},
{
"render": "};",
"hl": [
2019-11-20 15:03:48 -05:00
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 53
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 54
2019-11-20 15:03:48 -05:00
},
{
"render": "int tcgetattr (int fd, struct termios *termios_p);",
2019-11-20 15:03:48 -05:00
"hl": [
4,
4,
4,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
4,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
3,
3,
3,
3,
3,
3,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 55
2019-11-20 15:03:48 -05:00
},
{
"render": "int tcsetattr (int fd, int optional_actions, const struct termios *termios_p);",
2019-11-20 15:03:48 -05:00
"hl": [
4,
4,
4,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
4,
0,
0,
0,
0,
0,
4,
2019-11-20 15:03:48 -05:00
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 56
2019-11-20 15:03:48 -05:00
},
{
"render": "",
"hl": [],
"idx": 57
2019-11-20 15:03:48 -05:00
},
{
"render": "\/\/ -----------------------------------------------------------------------------",
2019-11-20 15:03:48 -05:00
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
2019-11-20 15:03:48 -05:00
],
"idx": 58
2019-11-20 15:03:48 -05:00
},
{
"render": "\/\/! <sys\/ioctl.h>",
2019-11-20 15:03:48 -05:00
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 59
},
{
"render": "\/\/ -----------------------------------------------------------------------------",
2019-11-20 15:03:48 -05:00
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
2019-11-20 15:03:48 -05:00
],
"idx": 60
2019-11-20 15:03:48 -05:00
},
{
"render": "struct winsize {",
2019-11-20 15:03:48 -05:00
"hl": [
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 61
2019-11-20 15:03:48 -05:00
},
{
"render": " unsigned short ws_row;",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 62
2019-11-20 15:03:48 -05:00
},
{
"render": " unsigned short ws_col;",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 63
2019-11-20 15:03:48 -05:00
},
{
"render": " unsigned short ws_xpixel;",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0
],
"idx": 64
2019-11-20 15:03:48 -05:00
},
{
"render": " unsigned short ws_ypixel;",
2019-11-20 15:03:48 -05:00
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 65
},
{
"render": "};",
"hl": [
2019-11-20 15:03:48 -05:00
0,
0
],
"idx": 66
2019-11-20 15:03:48 -05:00
},
{
"render": "int ioctl (int, int, ...);",
2019-11-20 15:03:48 -05:00
"hl": [
4,
4,
4,
0,
0,
0,
2019-11-20 15:03:48 -05:00
0,
0,
0,
0,
0,
4,
4,
4,
0,
0,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0
2019-11-20 15:03:48 -05:00
],
"idx": 67
2019-11-20 15:03:48 -05:00
}
],
2021-03-10 22:55:52 -05:00
"dirty": false,
"filename": "src\/ffi.h",
2019-11-20 15:03:48 -05:00
"syntax": {
2021-03-10 22:55:52 -05:00
"tokens": [],
"filetype": "C",
2019-11-20 15:03:48 -05:00
"filematch": [
".c",
".h",
".cpp"
2019-11-20 15:03:48 -05:00
],
"keywords1": [
"continue",
"typedef",
"switch",
2019-11-20 15:03:48 -05:00
"return",
"static",
"while",
"break",
"struct",
"union",
"class",
"else",
"enum",
"for",
"case",
"if"
2019-11-20 15:03:48 -05:00
],
"keywords2": [
"#include",
"unsigned",
"#define",
"#ifndef",
"double",
"signed",
"#endif",
"#ifdef",
2019-11-20 15:03:48 -05:00
"float",
"#error",
"#undef",
"long",
"char",
"int",
2019-11-20 15:03:48 -05:00
"void",
"#if"
2019-11-20 15:03:48 -05:00
],
2021-03-10 22:55:52 -05:00
"singleLineCommentStart": "\/\/",
"multiLineCommentStart": "\/*",
"multiLineCommentEnd": "*\/",
2019-11-20 15:03:48 -05:00
"flags": 3
},
"tokens": []
2019-11-20 15:03:48 -05:00
}