@arborium/objc 1.1.5 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar.js +310 -2905
- package/grammar_bg.wasm +0 -0
- package/package.json +25 -34
- package/grammar.core.wasm +0 -0
- package/grammar.core2.wasm +0 -0
- package/grammar.core3.wasm +0 -0
- package/grammar.core4.wasm +0 -0
- package/grammar.d.ts +0 -63
- package/interfaces/arborium-grammar-plugin.d.ts +0 -15
- package/interfaces/arborium-grammar-types.d.ts +0 -30
- package/interfaces/wasi-cli-environment.d.ts +0 -2
- package/interfaces/wasi-cli-exit.d.ts +0 -3
- package/interfaces/wasi-cli-stderr.d.ts +0 -3
- package/interfaces/wasi-cli-stdin.d.ts +0 -3
- package/interfaces/wasi-cli-stdout.d.ts +0 -3
- package/interfaces/wasi-clocks-wall-clock.d.ts +0 -5
- package/interfaces/wasi-filesystem-preopens.d.ts +0 -3
- package/interfaces/wasi-filesystem-types.d.ts +0 -124
- package/interfaces/wasi-io-error.d.ts +0 -8
- package/interfaces/wasi-io-streams.d.ts +0 -28
- package/interfaces/wasi-random-random.d.ts +0 -2
package/grammar_bg.wasm
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"author": "Amos Wenger <amos@bearcove.eu>",
|
|
3
|
+
"bugs": {
|
|
4
|
+
"url": "https://github.com/bearcove/arborium/issues"
|
|
5
|
+
},
|
|
4
6
|
"description": "Syntax highlighting for Objective-C, powered by WebAssembly",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"types": "./grammar.d.ts",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18"
|
|
9
|
+
},
|
|
9
10
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
"import": "./grammar.js",
|
|
12
|
-
"types": "./grammar.d.ts"
|
|
13
|
-
},
|
|
11
|
+
".": "./grammar.js",
|
|
14
12
|
"./grammar.js": "./grammar.js",
|
|
15
|
-
"./
|
|
13
|
+
"./grammar_bg.wasm": "./grammar_bg.wasm"
|
|
16
14
|
},
|
|
17
15
|
"files": [
|
|
18
16
|
"grammar.js",
|
|
19
|
-
"
|
|
20
|
-
"grammar.core.wasm",
|
|
21
|
-
"grammar.core2.wasm",
|
|
22
|
-
"grammar.core3.wasm",
|
|
23
|
-
"grammar.core4.wasm",
|
|
24
|
-
"interfaces"
|
|
17
|
+
"grammar_bg.wasm"
|
|
25
18
|
],
|
|
26
|
-
"
|
|
19
|
+
"funding": {
|
|
20
|
+
"type": "github",
|
|
21
|
+
"url": "https://github.com/sponsors/fasterthanlime"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/bearcove/arborium",
|
|
27
24
|
"keywords": [
|
|
28
25
|
"arborium",
|
|
29
26
|
"syntax-highlighting",
|
|
@@ -32,24 +29,18 @@
|
|
|
32
29
|
"Objective-C",
|
|
33
30
|
"wasm"
|
|
34
31
|
],
|
|
35
|
-
"author": "Amos Wenger <amos@bearcove.eu>",
|
|
36
32
|
"license": "MIT OR Apache-2.0",
|
|
33
|
+
"main": "./grammar.js",
|
|
34
|
+
"module": "./grammar.js",
|
|
35
|
+
"name": "@arborium/objc",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
37
39
|
"repository": {
|
|
38
40
|
"type": "git",
|
|
39
|
-
"url": "
|
|
40
|
-
},
|
|
41
|
-
"homepage": "https://github.com/bearcove/arborium",
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/bearcove/arborium/issues"
|
|
41
|
+
"url": "https://github.com/bearcove/arborium"
|
|
44
42
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
"engines": {
|
|
50
|
-
"node": ">=18"
|
|
51
|
-
},
|
|
52
|
-
"publishConfig": {
|
|
53
|
-
"access": "public"
|
|
54
|
-
}
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"type": "module",
|
|
45
|
+
"version": "1.2.3"
|
|
55
46
|
}
|
package/grammar.core.wasm
DELETED
|
Binary file
|
package/grammar.core2.wasm
DELETED
|
Binary file
|
package/grammar.core3.wasm
DELETED
|
Binary file
|
package/grammar.core4.wasm
DELETED
|
Binary file
|
package/grammar.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// world root:component/root
|
|
2
|
-
import type * as ArboriumGrammarTypes from './interfaces/arborium-grammar-types.js'; // arborium:grammar/types@0.1.0
|
|
3
|
-
import type * as WasiCliEnvironment from './interfaces/wasi-cli-environment.js'; // wasi:cli/environment@0.2.3
|
|
4
|
-
import type * as WasiCliExit from './interfaces/wasi-cli-exit.js'; // wasi:cli/exit@0.2.3
|
|
5
|
-
import type * as WasiCliStderr from './interfaces/wasi-cli-stderr.js'; // wasi:cli/stderr@0.2.3
|
|
6
|
-
import type * as WasiCliStdin from './interfaces/wasi-cli-stdin.js'; // wasi:cli/stdin@0.2.3
|
|
7
|
-
import type * as WasiCliStdout from './interfaces/wasi-cli-stdout.js'; // wasi:cli/stdout@0.2.3
|
|
8
|
-
import type * as WasiClocksWallClock from './interfaces/wasi-clocks-wall-clock.js'; // wasi:clocks/wall-clock@0.2.3
|
|
9
|
-
import type * as WasiFilesystemPreopens from './interfaces/wasi-filesystem-preopens.js'; // wasi:filesystem/preopens@0.2.3
|
|
10
|
-
import type * as WasiFilesystemTypes from './interfaces/wasi-filesystem-types.js'; // wasi:filesystem/types@0.2.3
|
|
11
|
-
import type * as WasiIoError from './interfaces/wasi-io-error.js'; // wasi:io/error@0.2.3
|
|
12
|
-
import type * as WasiIoStreams from './interfaces/wasi-io-streams.js'; // wasi:io/streams@0.2.3
|
|
13
|
-
import type * as WasiRandomRandom from './interfaces/wasi-random-random.js'; // wasi:random/random@0.2.3
|
|
14
|
-
import type * as ArboriumGrammarPlugin from './interfaces/arborium-grammar-plugin.js'; // arborium:grammar/plugin@0.1.0
|
|
15
|
-
export interface ImportObject {
|
|
16
|
-
'arborium:grammar/types@0.1.0': typeof ArboriumGrammarTypes,
|
|
17
|
-
'wasi:cli/environment@0.2.3': typeof WasiCliEnvironment,
|
|
18
|
-
'wasi:cli/exit@0.2.3': typeof WasiCliExit,
|
|
19
|
-
'wasi:cli/stderr@0.2.3': typeof WasiCliStderr,
|
|
20
|
-
'wasi:cli/stdin@0.2.3': typeof WasiCliStdin,
|
|
21
|
-
'wasi:cli/stdout@0.2.3': typeof WasiCliStdout,
|
|
22
|
-
'wasi:clocks/wall-clock@0.2.3': typeof WasiClocksWallClock,
|
|
23
|
-
'wasi:filesystem/preopens@0.2.3': typeof WasiFilesystemPreopens,
|
|
24
|
-
'wasi:filesystem/types@0.2.3': typeof WasiFilesystemTypes,
|
|
25
|
-
'wasi:io/error@0.2.3': typeof WasiIoError,
|
|
26
|
-
'wasi:io/streams@0.2.3': typeof WasiIoStreams,
|
|
27
|
-
'wasi:random/random@0.2.3': typeof WasiRandomRandom,
|
|
28
|
-
}
|
|
29
|
-
export interface Root {
|
|
30
|
-
'arborium:grammar/plugin@0.1.0': typeof ArboriumGrammarPlugin,
|
|
31
|
-
plugin: typeof ArboriumGrammarPlugin,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Instantiates this component with the provided imports and
|
|
36
|
-
* returns a map of all the exports of the component.
|
|
37
|
-
*
|
|
38
|
-
* This function is intended to be similar to the
|
|
39
|
-
* `WebAssembly.instantiate` function. The second `imports`
|
|
40
|
-
* argument is the "import object" for wasm, except here it
|
|
41
|
-
* uses component-model-layer types instead of core wasm
|
|
42
|
-
* integers/numbers/etc.
|
|
43
|
-
*
|
|
44
|
-
* The first argument to this function, `getCoreModule`, is
|
|
45
|
-
* used to compile core wasm modules within the component.
|
|
46
|
-
* Components are composed of core wasm modules and this callback
|
|
47
|
-
* will be invoked per core wasm module. The caller of this
|
|
48
|
-
* function is responsible for reading the core wasm module
|
|
49
|
-
* identified by `path` and returning its compiled
|
|
50
|
-
* `WebAssembly.Module` object. This would use `compileStreaming`
|
|
51
|
-
* on the web, for example.
|
|
52
|
-
*/
|
|
53
|
-
export function instantiate(
|
|
54
|
-
getCoreModule: (path: string) => WebAssembly.Module,
|
|
55
|
-
imports: ImportObject,
|
|
56
|
-
instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance
|
|
57
|
-
): Root;
|
|
58
|
-
export function instantiate(
|
|
59
|
-
getCoreModule: (path: string) => WebAssembly.Module | Promise<WebAssembly.Module>,
|
|
60
|
-
imports: ImportObject,
|
|
61
|
-
instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance | Promise<WebAssembly.Instance>
|
|
62
|
-
): Root | Promise<Root>;
|
|
63
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @module Interface arborium:grammar/plugin@0.1.0 **/
|
|
2
|
-
export function languageId(): string;
|
|
3
|
-
export function injectionLanguages(): Array<string>;
|
|
4
|
-
export function createSession(): Session;
|
|
5
|
-
export function freeSession(session: Session): void;
|
|
6
|
-
export function setText(session: Session, text: string): void;
|
|
7
|
-
export function applyEdit(session: Session, text: string, edit: Edit): void;
|
|
8
|
-
export function parse(session: Session): ParseResult;
|
|
9
|
-
export function cancel(session: Session): void;
|
|
10
|
-
export type Span = import('./arborium-grammar-types.js').Span;
|
|
11
|
-
export type Injection = import('./arborium-grammar-types.js').Injection;
|
|
12
|
-
export type ParseResult = import('./arborium-grammar-types.js').ParseResult;
|
|
13
|
-
export type Edit = import('./arborium-grammar-types.js').Edit;
|
|
14
|
-
export type ParseError = import('./arborium-grammar-types.js').ParseError;
|
|
15
|
-
export type Session = number;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** @module Interface arborium:grammar/types@0.1.0 **/
|
|
2
|
-
export interface Span {
|
|
3
|
-
start: number,
|
|
4
|
-
end: number,
|
|
5
|
-
capture: string,
|
|
6
|
-
}
|
|
7
|
-
export interface Injection {
|
|
8
|
-
start: number,
|
|
9
|
-
end: number,
|
|
10
|
-
language: string,
|
|
11
|
-
includeChildren: boolean,
|
|
12
|
-
}
|
|
13
|
-
export interface ParseResult {
|
|
14
|
-
spans: Array<Span>,
|
|
15
|
-
injections: Array<Injection>,
|
|
16
|
-
}
|
|
17
|
-
export interface Edit {
|
|
18
|
-
startByte: number,
|
|
19
|
-
oldEndByte: number,
|
|
20
|
-
newEndByte: number,
|
|
21
|
-
startRow: number,
|
|
22
|
-
startCol: number,
|
|
23
|
-
oldEndRow: number,
|
|
24
|
-
oldEndCol: number,
|
|
25
|
-
newEndRow: number,
|
|
26
|
-
newEndCol: number,
|
|
27
|
-
}
|
|
28
|
-
export interface ParseError {
|
|
29
|
-
message: string,
|
|
30
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/** @module Interface wasi:filesystem/types@0.2.3 **/
|
|
2
|
-
export function filesystemErrorCode(err: Error): ErrorCode | undefined;
|
|
3
|
-
export type Filesize = bigint;
|
|
4
|
-
export type OutputStream = import('./wasi-io-streams.js').OutputStream;
|
|
5
|
-
/**
|
|
6
|
-
* # Variants
|
|
7
|
-
*
|
|
8
|
-
* ## `"access"`
|
|
9
|
-
*
|
|
10
|
-
* ## `"would-block"`
|
|
11
|
-
*
|
|
12
|
-
* ## `"already"`
|
|
13
|
-
*
|
|
14
|
-
* ## `"bad-descriptor"`
|
|
15
|
-
*
|
|
16
|
-
* ## `"busy"`
|
|
17
|
-
*
|
|
18
|
-
* ## `"deadlock"`
|
|
19
|
-
*
|
|
20
|
-
* ## `"quota"`
|
|
21
|
-
*
|
|
22
|
-
* ## `"exist"`
|
|
23
|
-
*
|
|
24
|
-
* ## `"file-too-large"`
|
|
25
|
-
*
|
|
26
|
-
* ## `"illegal-byte-sequence"`
|
|
27
|
-
*
|
|
28
|
-
* ## `"in-progress"`
|
|
29
|
-
*
|
|
30
|
-
* ## `"interrupted"`
|
|
31
|
-
*
|
|
32
|
-
* ## `"invalid"`
|
|
33
|
-
*
|
|
34
|
-
* ## `"io"`
|
|
35
|
-
*
|
|
36
|
-
* ## `"is-directory"`
|
|
37
|
-
*
|
|
38
|
-
* ## `"loop"`
|
|
39
|
-
*
|
|
40
|
-
* ## `"too-many-links"`
|
|
41
|
-
*
|
|
42
|
-
* ## `"message-size"`
|
|
43
|
-
*
|
|
44
|
-
* ## `"name-too-long"`
|
|
45
|
-
*
|
|
46
|
-
* ## `"no-device"`
|
|
47
|
-
*
|
|
48
|
-
* ## `"no-entry"`
|
|
49
|
-
*
|
|
50
|
-
* ## `"no-lock"`
|
|
51
|
-
*
|
|
52
|
-
* ## `"insufficient-memory"`
|
|
53
|
-
*
|
|
54
|
-
* ## `"insufficient-space"`
|
|
55
|
-
*
|
|
56
|
-
* ## `"not-directory"`
|
|
57
|
-
*
|
|
58
|
-
* ## `"not-empty"`
|
|
59
|
-
*
|
|
60
|
-
* ## `"not-recoverable"`
|
|
61
|
-
*
|
|
62
|
-
* ## `"unsupported"`
|
|
63
|
-
*
|
|
64
|
-
* ## `"no-tty"`
|
|
65
|
-
*
|
|
66
|
-
* ## `"no-such-device"`
|
|
67
|
-
*
|
|
68
|
-
* ## `"overflow"`
|
|
69
|
-
*
|
|
70
|
-
* ## `"not-permitted"`
|
|
71
|
-
*
|
|
72
|
-
* ## `"pipe"`
|
|
73
|
-
*
|
|
74
|
-
* ## `"read-only"`
|
|
75
|
-
*
|
|
76
|
-
* ## `"invalid-seek"`
|
|
77
|
-
*
|
|
78
|
-
* ## `"text-file-busy"`
|
|
79
|
-
*
|
|
80
|
-
* ## `"cross-device"`
|
|
81
|
-
*/
|
|
82
|
-
export type ErrorCode = 'access' | 'would-block' | 'already' | 'bad-descriptor' | 'busy' | 'deadlock' | 'quota' | 'exist' | 'file-too-large' | 'illegal-byte-sequence' | 'in-progress' | 'interrupted' | 'invalid' | 'io' | 'is-directory' | 'loop' | 'too-many-links' | 'message-size' | 'name-too-long' | 'no-device' | 'no-entry' | 'no-lock' | 'insufficient-memory' | 'insufficient-space' | 'not-directory' | 'not-empty' | 'not-recoverable' | 'unsupported' | 'no-tty' | 'no-such-device' | 'overflow' | 'not-permitted' | 'pipe' | 'read-only' | 'invalid-seek' | 'text-file-busy' | 'cross-device';
|
|
83
|
-
/**
|
|
84
|
-
* # Variants
|
|
85
|
-
*
|
|
86
|
-
* ## `"unknown"`
|
|
87
|
-
*
|
|
88
|
-
* ## `"block-device"`
|
|
89
|
-
*
|
|
90
|
-
* ## `"character-device"`
|
|
91
|
-
*
|
|
92
|
-
* ## `"directory"`
|
|
93
|
-
*
|
|
94
|
-
* ## `"fifo"`
|
|
95
|
-
*
|
|
96
|
-
* ## `"symbolic-link"`
|
|
97
|
-
*
|
|
98
|
-
* ## `"regular-file"`
|
|
99
|
-
*
|
|
100
|
-
* ## `"socket"`
|
|
101
|
-
*/
|
|
102
|
-
export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
|
|
103
|
-
export type LinkCount = bigint;
|
|
104
|
-
export type Datetime = import('./wasi-clocks-wall-clock.js').Datetime;
|
|
105
|
-
export interface DescriptorStat {
|
|
106
|
-
type: DescriptorType,
|
|
107
|
-
linkCount: LinkCount,
|
|
108
|
-
size: Filesize,
|
|
109
|
-
dataAccessTimestamp?: Datetime,
|
|
110
|
-
dataModificationTimestamp?: Datetime,
|
|
111
|
-
statusChangeTimestamp?: Datetime,
|
|
112
|
-
}
|
|
113
|
-
export type Error = import('./wasi-io-streams.js').Error;
|
|
114
|
-
|
|
115
|
-
export class Descriptor {
|
|
116
|
-
/**
|
|
117
|
-
* This type does not have a public constructor.
|
|
118
|
-
*/
|
|
119
|
-
private constructor();
|
|
120
|
-
writeViaStream(offset: Filesize): OutputStream;
|
|
121
|
-
appendViaStream(): OutputStream;
|
|
122
|
-
getType(): DescriptorType;
|
|
123
|
-
stat(): DescriptorStat;
|
|
124
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** @module Interface wasi:io/streams@0.2.3 **/
|
|
2
|
-
export type Error = import('./wasi-io-error.js').Error;
|
|
3
|
-
export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
|
|
4
|
-
export interface StreamErrorLastOperationFailed {
|
|
5
|
-
tag: 'last-operation-failed',
|
|
6
|
-
val: Error,
|
|
7
|
-
}
|
|
8
|
-
export interface StreamErrorClosed {
|
|
9
|
-
tag: 'closed',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class InputStream {
|
|
13
|
-
/**
|
|
14
|
-
* This type does not have a public constructor.
|
|
15
|
-
*/
|
|
16
|
-
private constructor();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class OutputStream {
|
|
20
|
-
/**
|
|
21
|
-
* This type does not have a public constructor.
|
|
22
|
-
*/
|
|
23
|
-
private constructor();
|
|
24
|
-
checkWrite(): bigint;
|
|
25
|
-
write(contents: Uint8Array): void;
|
|
26
|
-
blockingWriteAndFlush(contents: Uint8Array): void;
|
|
27
|
-
blockingFlush(): void;
|
|
28
|
-
}
|