@exercism/codemirror-lang-cpp 0.0.0-stage → 1.0.0
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/CHANGELOG.md +68 -0
- package/LICENSE +21 -0
- package/README.md +154 -2
- package/dist/index.cjs +1018 -0
- package/dist/index.d.cts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +1007 -0
- package/package.json +54 -4
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LanguageSupport, LRLanguage } from '@codemirror/language';
|
|
2
|
+
import { Completion, CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
A collection of C-related
|
|
6
|
+
[snippets](https://codemirror.net/6/docs/ref/#autocomplete.snippet).
|
|
7
|
+
*/
|
|
8
|
+
declare const cSnippets: readonly Completion[];
|
|
9
|
+
/**
|
|
10
|
+
A collection of C++-related
|
|
11
|
+
[snippets](https://codemirror.net/6/docs/ref/#autocomplete.snippet).
|
|
12
|
+
*/
|
|
13
|
+
declare const cppSnippets: readonly Completion[];
|
|
14
|
+
/**
|
|
15
|
+
Snippets for Objective-C. They cover C's constructs and the
|
|
16
|
+
Objective-C class, method, loop and literal forms.
|
|
17
|
+
*/
|
|
18
|
+
declare const objcSnippets: readonly Completion[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
Completion source that looks up the names declared in the file
|
|
22
|
+
(functions, types, variables, parameters, fields and macros), and
|
|
23
|
+
offers each one where it is in scope.
|
|
24
|
+
*/
|
|
25
|
+
declare const localCompletionSource: CompletionSource;
|
|
26
|
+
/**
|
|
27
|
+
Completion source for Objective-C selectors. Where a message names
|
|
28
|
+
its method, as in `[list add|`, it offers the given selectors and
|
|
29
|
+
the selectors of the methods declared in the file.
|
|
30
|
+
*/
|
|
31
|
+
declare function selectorCompletionSource(selectors: readonly Completion[]): CompletionSource;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
A language provider based on Exercism's fork of the [Lezer C++
|
|
35
|
+
parser](https://code.haverbeke.berlin/lezer/cpp), extended with
|
|
36
|
+
highlighting and indentation information.
|
|
37
|
+
*/
|
|
38
|
+
declare const cppLanguage: LRLanguage;
|
|
39
|
+
/**
|
|
40
|
+
Language support for C++. Includes
|
|
41
|
+
[snippet](https://codemirror.net/6/docs/ref/#lang-cpp.cppSnippets), keyword, standard library and
|
|
42
|
+
local name completion.
|
|
43
|
+
*/
|
|
44
|
+
declare function cpp(): LanguageSupport;
|
|
45
|
+
/**
|
|
46
|
+
Language support for C. It uses the C++ parser, which also parses
|
|
47
|
+
C, and completes C's keywords, standard library and
|
|
48
|
+
[snippets](https://codemirror.net/6/docs/ref/#lang-cpp.cSnippets) along with local names.
|
|
49
|
+
*/
|
|
50
|
+
declare function c(): LanguageSupport;
|
|
51
|
+
/**
|
|
52
|
+
A language provider for Objective-C, using the parser's `objc`
|
|
53
|
+
dialect.
|
|
54
|
+
*/
|
|
55
|
+
declare const objcLanguage: LRLanguage;
|
|
56
|
+
/**
|
|
57
|
+
Language support for Objective-C. Includes C's keywords and
|
|
58
|
+
library, the Objective-C keywords, types and `@` directives, the
|
|
59
|
+
common Foundation classes, functions and methods,
|
|
60
|
+
[snippets](https://codemirror.net/6/docs/ref/#lang-cpp.objcSnippets), and local names.
|
|
61
|
+
*/
|
|
62
|
+
declare function objc(): LanguageSupport;
|
|
63
|
+
|
|
64
|
+
export { c, cSnippets, cpp, cppLanguage, cppSnippets, localCompletionSource, objc, objcLanguage, objcSnippets, selectorCompletionSource };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LanguageSupport, LRLanguage } from '@codemirror/language';
|
|
2
|
+
import { Completion, CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
A collection of C-related
|
|
6
|
+
[snippets](https://codemirror.net/6/docs/ref/#autocomplete.snippet).
|
|
7
|
+
*/
|
|
8
|
+
declare const cSnippets: readonly Completion[];
|
|
9
|
+
/**
|
|
10
|
+
A collection of C++-related
|
|
11
|
+
[snippets](https://codemirror.net/6/docs/ref/#autocomplete.snippet).
|
|
12
|
+
*/
|
|
13
|
+
declare const cppSnippets: readonly Completion[];
|
|
14
|
+
/**
|
|
15
|
+
Snippets for Objective-C. They cover C's constructs and the
|
|
16
|
+
Objective-C class, method, loop and literal forms.
|
|
17
|
+
*/
|
|
18
|
+
declare const objcSnippets: readonly Completion[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
Completion source that looks up the names declared in the file
|
|
22
|
+
(functions, types, variables, parameters, fields and macros), and
|
|
23
|
+
offers each one where it is in scope.
|
|
24
|
+
*/
|
|
25
|
+
declare const localCompletionSource: CompletionSource;
|
|
26
|
+
/**
|
|
27
|
+
Completion source for Objective-C selectors. Where a message names
|
|
28
|
+
its method, as in `[list add|`, it offers the given selectors and
|
|
29
|
+
the selectors of the methods declared in the file.
|
|
30
|
+
*/
|
|
31
|
+
declare function selectorCompletionSource(selectors: readonly Completion[]): CompletionSource;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
A language provider based on Exercism's fork of the [Lezer C++
|
|
35
|
+
parser](https://code.haverbeke.berlin/lezer/cpp), extended with
|
|
36
|
+
highlighting and indentation information.
|
|
37
|
+
*/
|
|
38
|
+
declare const cppLanguage: LRLanguage;
|
|
39
|
+
/**
|
|
40
|
+
Language support for C++. Includes
|
|
41
|
+
[snippet](https://codemirror.net/6/docs/ref/#lang-cpp.cppSnippets), keyword, standard library and
|
|
42
|
+
local name completion.
|
|
43
|
+
*/
|
|
44
|
+
declare function cpp(): LanguageSupport;
|
|
45
|
+
/**
|
|
46
|
+
Language support for C. It uses the C++ parser, which also parses
|
|
47
|
+
C, and completes C's keywords, standard library and
|
|
48
|
+
[snippets](https://codemirror.net/6/docs/ref/#lang-cpp.cSnippets) along with local names.
|
|
49
|
+
*/
|
|
50
|
+
declare function c(): LanguageSupport;
|
|
51
|
+
/**
|
|
52
|
+
A language provider for Objective-C, using the parser's `objc`
|
|
53
|
+
dialect.
|
|
54
|
+
*/
|
|
55
|
+
declare const objcLanguage: LRLanguage;
|
|
56
|
+
/**
|
|
57
|
+
Language support for Objective-C. Includes C's keywords and
|
|
58
|
+
library, the Objective-C keywords, types and `@` directives, the
|
|
59
|
+
common Foundation classes, functions and methods,
|
|
60
|
+
[snippets](https://codemirror.net/6/docs/ref/#lang-cpp.objcSnippets), and local names.
|
|
61
|
+
*/
|
|
62
|
+
declare function objc(): LanguageSupport;
|
|
63
|
+
|
|
64
|
+
export { c, cSnippets, cpp, cppLanguage, cppSnippets, localCompletionSource, objc, objcLanguage, objcSnippets, selectorCompletionSource };
|