php-kilo/tests/__snapshots__/EditorTest__testOpen__1.json

2155 lines
50 KiB
JSON

{
"cursor": {
"x": 0,
"y": 0
},
"document": {
"fileType": {
"name": "C",
"syntax": {
"tokens": [],
"filetype": "C",
"keywords1": [
"auto",
"break",
"case",
"const",
"continue",
"default",
"do",
"typedef",
"switch",
"return",
"static",
"while",
"break",
"struct",
"extern",
"union",
"class",
"else",
"enum",
"for",
"case",
"if",
"inline",
"register",
"restrict",
"return",
"sizeof",
"switch",
"typedef",
"union",
"volatile"
],
"keywords2": [
"#include",
"unsigned",
"#define",
"#ifndef",
"double",
"signed",
"#endif",
"#ifdef",
"float",
"#error",
"#undef",
"#elif",
"long",
"char",
"int",
"void",
"#if",
"uint32_t",
"wchar_t",
"int32_t",
"int64_t",
"uint64_t",
"int16_t",
"uint16_t",
"uint8_t",
"int8_t"
],
"operators": [
"<=>",
"<<=",
">>=",
"++",
"--",
"==",
"!=",
">=",
"<=",
"&&",
"||",
"<<",
">>",
"+=",
"-=",
"*=",
"\/=",
"%=",
"&=",
"|=",
"^=",
"->",
"::"
],
"singleLineCommentStart": "\/\/",
"multiLineCommentStart": "\/*",
"multiLineCommentEnd": "*\/"
}
},
"tokens": [],
"filename": "src\/ffi.h",
"rows": [
{
"render": "\/**",
"hl": [
2,
2,
2
],
"idx": 0
},
{
"render": " * Interfaces for PHP FFI",
"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
],
"idx": 1
},
{
"render": " *",
"hl": [
2,
2
],
"idx": 2
},
{
"render": " * Most of the structure code is cribbed from GLib",
"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,
2,
2,
2,
2,
2,
2,
2
],
"idx": 3
},
{
"render": " *",
"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,
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
},
{
"render": " *\/",
"hl": [
2,
2,
2
],
"idx": 6
},
{
"render": "",
"hl": [],
"idx": 7
},
{
"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,
7,
0,
0,
0,
7,
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,
7
],
"idx": 16
},
{
"render": "# char y = 'q';",
"hl": [
0,
0,
0,
0,
0,
4,
4,
4,
4,
0,
0,
0,
7,
0,
13,
13,
13,
7
],
"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,
7
],
"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;",
"hl": [
3,
3,
3,
3,
3,
3,
3,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
4,
4,
4,
4,
0,
0,
0,
0,
0,
7
],
"idx": 28
},
{
"render": "",
"hl": [],
"idx": 29
},
{
"render": "\/* Type of baud rate specifiers. *\/",
"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
],
"idx": 30
},
{
"render": "typedef long int speed_t;",
"hl": [
3,
3,
3,
3,
3,
3,
3,
0,
4,
4,
4,
4,
0,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"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": [
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0
],
"idx": 34
},
{
"render": "{",
"hl": [
9
],
"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,
7
],
"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": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 43
},
{
"render": "",
"hl": [],
"idx": 44
},
{
"render": " \/* Local modes. *\/",
"hl": [
0,
0,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"idx": 45
},
{
"render": " tcflag_t c_lflag;",
"hl": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 46
},
{
"render": "",
"hl": [],
"idx": 47
},
{
"render": " \/* Control characters. *\/",
"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": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
6,
6,
9,
7
],
"idx": 49
},
{
"render": "",
"hl": [],
"idx": 50
},
{
"render": " \/* Input and output baud rates. *\/",
"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": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 52
},
{
"render": "};",
"hl": [
9,
7
],
"idx": 53
},
{
"render": "",
"hl": [],
"idx": 54
},
{
"render": "int tcgetattr (int fd, struct termios *termios_p);",
"hl": [
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
4,
4,
4,
0,
0,
0,
7,
0,
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
7
],
"idx": 55
},
{
"render": "int tcsetattr (int fd, int optional_actions, const struct termios *termios_p);",
"hl": [
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
4,
4,
4,
0,
0,
0,
7,
0,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
3,
3,
3,
3,
3,
0,
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9,
7
],
"idx": 56
},
{
"render": "",
"hl": [],
"idx": 57
},
{
"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": 58
},
{
"render": "\/\/! <sys\/ioctl.h>",
"hl": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"idx": 59
},
{
"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": 60
},
{
"render": "struct winsize {",
"hl": [
3,
3,
3,
3,
3,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
9
],
"idx": 61
},
{
"render": " unsigned short ws_row;",
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 62
},
{
"render": " unsigned short ws_col;",
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 63
},
{
"render": " unsigned short ws_xpixel;",
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 64
},
{
"render": " unsigned short ws_ypixel;",
"hl": [
0,
0,
0,
0,
4,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7
],
"idx": 65
},
{
"render": "};",
"hl": [
9,
7
],
"idx": 66
},
{
"render": "int ioctl (int, int, ...);",
"hl": [
4,
4,
4,
0,
0,
0,
0,
0,
0,
0,
9,
4,
4,
4,
7,
0,
4,
4,
4,
7,
0,
0,
0,
0,
9,
7
],
"idx": 67
}
],
"dirty": false
},
"offset": {
"x": 0,
"y": 0
},
"renderX": 0,
"terminalSize": {
"rows": 21,
"cols": 80
},
"statusMessage": {
"text": "HELP: Ctrl-S = save | Ctrl-Q = quit | Ctrl-F = find",
"len": 51,
"time": 1234567890
}
}