@cparra/apex-reflection 0.1.0-alpha.0 → 0.1.1-alpha.10
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/__tests__/end-to-end.test.ts +256 -0
- package/coverage/clover.xml +12857 -0
- package/coverage/coverage-final.json +3 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +126 -0
- package/coverage/lcov-report/index.js.html +104 -0
- package/coverage/lcov-report/out.js.html +41126 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov.info +24801 -0
- package/index.d.ts +118 -0
- package/index.js +8 -0
- package/index.ts +141 -0
- package/jest.config.js +11 -0
- package/out.js +13708 -0
- package/package.json +22 -17
- package/tsconfig.json +5 -3
- package/.idea/apexdocs-dart.iml +0 -18
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/libraries/Dart_Packages.xml +0 -556
- package/.idea/libraries/Dart_SDK.xml +0 -28
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/runConfigurations/_template__of_Dart_Test.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/CHANGELOG.md +0 -3
- package/README.md +0 -26
- package/TODO.md +0 -5
- package/analysis_options.yaml +0 -30
- package/antlr4-4.9.2/CHANGELOG.md +0 -4
- package/antlr4-4.9.2/LICENSE +0 -52
- package/antlr4-4.9.2/README.md +0 -11
- package/antlr4-4.9.2/analysis_options.yaml +0 -1
- package/antlr4-4.9.2/lib/antlr4.dart +0 -21
- package/antlr4-4.9.2/lib/src/atn/atn.dart +0 -18
- package/antlr4-4.9.2/lib/src/atn/src/atn.dart +0 -170
- package/antlr4-4.9.2/lib/src/atn/src/atn_config.dart +0 -242
- package/antlr4-4.9.2/lib/src/atn/src/atn_config_set.dart +0 -283
- package/antlr4-4.9.2/lib/src/atn/src/atn_deserializer.dart +0 -809
- package/antlr4-4.9.2/lib/src/atn/src/atn_simulator.dart +0 -95
- package/antlr4-4.9.2/lib/src/atn/src/atn_state.dart +0 -296
- package/antlr4-4.9.2/lib/src/atn/src/atn_type.dart +0 -14
- package/antlr4-4.9.2/lib/src/atn/src/info.dart +0 -553
- package/antlr4-4.9.2/lib/src/atn/src/lexer_action.dart +0 -601
- package/antlr4-4.9.2/lib/src/atn/src/lexer_action_executor.dart +0 -167
- package/antlr4-4.9.2/lib/src/atn/src/lexer_atn_simulator.dart +0 -731
- package/antlr4-4.9.2/lib/src/atn/src/parser_atn_simulator.dart +0 -2630
- package/antlr4-4.9.2/lib/src/atn/src/profiling_atn_simulator.dart +0 -229
- package/antlr4-4.9.2/lib/src/atn/src/semantic_context.dart +0 -404
- package/antlr4-4.9.2/lib/src/atn/src/transition.dart +0 -305
- package/antlr4-4.9.2/lib/src/dfa/dfa.dart +0 -8
- package/antlr4-4.9.2/lib/src/dfa/src/dfa.dart +0 -138
- package/antlr4-4.9.2/lib/src/dfa/src/dfa_serializer.dart +0 -76
- package/antlr4-4.9.2/lib/src/dfa/src/dfa_state.dart +0 -151
- package/antlr4-4.9.2/lib/src/error/error.dart +0 -10
- package/antlr4-4.9.2/lib/src/error/src/diagnostic_error_listener.dart +0 -116
- package/antlr4-4.9.2/lib/src/error/src/error_listener.dart +0 -241
- package/antlr4-4.9.2/lib/src/error/src/error_strategy.dart +0 -902
- package/antlr4-4.9.2/lib/src/error/src/errors.dart +0 -204
- package/antlr4-4.9.2/lib/src/input_stream.dart +0 -335
- package/antlr4-4.9.2/lib/src/interval_set.dart +0 -735
- package/antlr4-4.9.2/lib/src/lexer.dart +0 -343
- package/antlr4-4.9.2/lib/src/ll1_analyzer.dart +0 -204
- package/antlr4-4.9.2/lib/src/misc/multi_map.dart +0 -32
- package/antlr4-4.9.2/lib/src/misc/pair.dart +0 -34
- package/antlr4-4.9.2/lib/src/parser.dart +0 -777
- package/antlr4-4.9.2/lib/src/parser_interpreter.dart +0 -393
- package/antlr4-4.9.2/lib/src/parser_rule_context.dart +0 -275
- package/antlr4-4.9.2/lib/src/prediction_context.dart +0 -877
- package/antlr4-4.9.2/lib/src/recognizer.dart +0 -182
- package/antlr4-4.9.2/lib/src/rule_context.dart +0 -192
- package/antlr4-4.9.2/lib/src/runtime_meta_data.dart +0 -188
- package/antlr4-4.9.2/lib/src/token.dart +0 -431
- package/antlr4-4.9.2/lib/src/token_factory.dart +0 -88
- package/antlr4-4.9.2/lib/src/token_source.dart +0 -241
- package/antlr4-4.9.2/lib/src/token_stream.dart +0 -627
- package/antlr4-4.9.2/lib/src/tree/src/pattern/chunk.dart +0 -90
- package/antlr4-4.9.2/lib/src/tree/src/pattern/parse_tree_match.dart +0 -635
- package/antlr4-4.9.2/lib/src/tree/src/tree.dart +0 -370
- package/antlr4-4.9.2/lib/src/tree/src/trees.dart +0 -226
- package/antlr4-4.9.2/lib/src/tree/tree.dart +0 -10
- package/antlr4-4.9.2/lib/src/util/bit_set.dart +0 -308
- package/antlr4-4.9.2/lib/src/util/murmur_hash.dart +0 -77
- package/antlr4-4.9.2/lib/src/util/utils.dart +0 -31
- package/antlr4-4.9.2/lib/src/vocabulary.dart +0 -254
- package/antlr4-4.9.2/pubspec.yaml +0 -13
- package/example/node_example/index.js +0 -8
- package/example/node_example/package.json +0 -12
- package/example/node_example_ts/package-lock.json +0 -70
- package/example/node_example_ts/package.json +0 -19
- package/example/node_example_ts/src/index.js +0 -5
- package/example/node_example_ts/src/index.ts +0 -9
- package/example/node_example_ts/tsconfig.json +0 -79
- package/js/dart2jsout.js +0 -25898
- package/js/dart2jsout.js.map +0 -16
- package/js/index.d.ts +0 -1
- package/js/index.js +0 -4
- package/js/out.js +0 -26023
- package/js/out.js.map +0 -16
- package/js/package-lock.json +0 -57
- package/js/preamble.js +0 -125
- package/lib/apexdocs_dart.dart +0 -28
- package/lib/src/antlr/grammars/Apexdoc/ApexdocLexer.g4 +0 -120
- package/lib/src/antlr/grammars/Apexdoc/ApexdocParser.g4 +0 -158
- package/lib/src/antlr/grammars/Apexdoc/gen/ApexdocLexer.interp +0 -95
- package/lib/src/antlr/grammars/Apexdoc/gen/ApexdocLexer.java +0 -238
- package/lib/src/antlr/grammars/Apexdoc/gen/ApexdocLexer.tokens +0 -23
- package/lib/src/antlr/grammars/apex/ApexLexer.g4 +0 -255
- package/lib/src/antlr/grammars/apex/ApexParser.g4 +0 -567
- package/lib/src/antlr/grammars/apex/examples/ApexClass.cls +0 -6
- package/lib/src/antlr/lib/apex/ApexLexer.dart +0 -1223
- package/lib/src/antlr/lib/apex/ApexLexer.interp +0 -393
- package/lib/src/antlr/lib/apex/ApexLexer.tokens +0 -212
- package/lib/src/antlr/lib/apex/ApexParser.dart +0 -9349
- package/lib/src/antlr/lib/apex/ApexParser.interp +0 -326
- package/lib/src/antlr/lib/apex/ApexParser.tokens +0 -212
- package/lib/src/antlr/lib/apex/ApexParserBaseListener.dart +0 -1036
- package/lib/src/antlr/lib/apex/ApexParserListener.dart +0 -975
- package/lib/src/antlr/lib/apexdoc/ApexdocLexer.dart +0 -373
- package/lib/src/antlr/lib/apexdoc/ApexdocLexer.interp +0 -95
- package/lib/src/antlr/lib/apexdoc/ApexdocLexer.tokens +0 -23
- package/lib/src/antlr/lib/apexdoc/ApexdocParser.dart +0 -2471
- package/lib/src/antlr/lib/apexdoc/ApexdocParser.interp +0 -69
- package/lib/src/antlr/lib/apexdoc/ApexdocParser.tokens +0 -23
- package/lib/src/antlr/lib/apexdoc/ApexdocParserBaseListener.dart +0 -252
- package/lib/src/antlr/lib/apexdoc/ApexdocParserListener.dart +0 -215
- package/lib/src/builders/builders.dart +0 -32
- package/lib/src/model/apex_file_manifest.dart +0 -37
- package/lib/src/model/apex_file_manifest.g.dart +0 -18
- package/lib/src/model/declaration.dart +0 -50
- package/lib/src/model/doc_comment.dart +0 -117
- package/lib/src/model/doc_comment.g.dart +0 -118
- package/lib/src/model/members.dart +0 -143
- package/lib/src/model/members.g.dart +0 -105
- package/lib/src/model/types.dart +0 -159
- package/lib/src/model/types.g.dart +0 -111
- package/lib/src/service/apex_listener.dart +0 -226
- package/lib/src/service/apexdoc_listener.dart +0 -82
- package/lib/src/service/parsers.dart +0 -33
- package/lib/src/service/utils/parsing/access_modifiers_parser.dart +0 -33
- package/lib/src/service/utils/parsing/parameters_parser.dart +0 -18
- package/lib/src/service/utils/parsing/parsing_utils.dart +0 -2
- package/lib/src/service/walker.dart +0 -82
- package/pubspec.yaml +0 -19
- package/test/apex_file_manifest_test.dart +0 -16
- package/test/apex_listener_test.dart +0 -703
- package/test/apexdoc_parser_test.dart +0 -179
- package/test/doc_comment_test.dart +0 -89
- package/test/members_serialization_test.dart +0 -158
- package/test/members_test.dart +0 -178
- package/test/types_serialization_test.dart +0 -191
- package/test/types_test.dart +0 -311
- package/test/walker_test.dart +0 -58
- package/tool/grind.dart +0 -20
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Use of this file is governed by the BSD 3-clause license that
|
|
4
|
-
* can be found in the LICENSE.txt file in the project root.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import 'dart:math';
|
|
8
|
-
|
|
9
|
-
import 'input_stream.dart';
|
|
10
|
-
import 'misc/pair.dart';
|
|
11
|
-
import 'token.dart';
|
|
12
|
-
import 'token_factory.dart';
|
|
13
|
-
|
|
14
|
-
/// A source of tokens must provide a sequence of tokens via {@link #nextToken()}
|
|
15
|
-
/// and also must reveal it's source of characters; [CommonToken]'s text is
|
|
16
|
-
/// computed from a [CharStream]; it only store indices into the char
|
|
17
|
-
/// stream.
|
|
18
|
-
///
|
|
19
|
-
/// <p>Errors from the lexer are never passed to the parser. Either you want to keep
|
|
20
|
-
/// going or you do not upon token recognition error. If you do not want to
|
|
21
|
-
/// continue lexing then you do not want to continue parsing. Just throw an
|
|
22
|
-
/// exception not under [RecognitionException] and Java will naturally toss
|
|
23
|
-
/// you all the way out of the recognizers. If you want to continue lexing then
|
|
24
|
-
/// you should not throw an exception to the parser--it has already requested a
|
|
25
|
-
/// token. Keep lexing until you get a valid one. Just report errors and keep
|
|
26
|
-
/// going, looking for a valid token.</p>
|
|
27
|
-
abstract class TokenSource {
|
|
28
|
-
/// Return a [Token] object from your input stream (usually a
|
|
29
|
-
/// [CharStream]). Do not fail/return upon lexing error; keep chewing
|
|
30
|
-
/// on the characters until you get a good one; errors are not passed through
|
|
31
|
-
/// to the parser.
|
|
32
|
-
Token nextToken();
|
|
33
|
-
|
|
34
|
-
/// Get the line number for the current position in the input stream. The
|
|
35
|
-
/// first line in the input is line 1.
|
|
36
|
-
///
|
|
37
|
-
/// @return The line number for the current position in the input stream, or
|
|
38
|
-
/// 0 if the current token source does not track line numbers.
|
|
39
|
-
int get line;
|
|
40
|
-
|
|
41
|
-
/// Get the index into the current line for the current position in the input
|
|
42
|
-
/// stream. The first character on a line has position 0.
|
|
43
|
-
///
|
|
44
|
-
/// @return The line number for the current position in the input stream, or
|
|
45
|
-
/// -1 if the current token source does not track character positions.
|
|
46
|
-
int get charPositionInLine;
|
|
47
|
-
|
|
48
|
-
/// Get the [CharStream] from which this token source is currently
|
|
49
|
-
/// providing tokens.
|
|
50
|
-
///
|
|
51
|
-
/// @return The [CharStream] associated with the current position in
|
|
52
|
-
/// the input, or null if no input stream is available for the token
|
|
53
|
-
/// source.
|
|
54
|
-
CharStream get inputStream;
|
|
55
|
-
|
|
56
|
-
/// Gets the name of the underlying input source. This method returns a
|
|
57
|
-
/// non-null, non-empty string. If such a name is not known, this method
|
|
58
|
-
/// returns {@link IntStream#UNKNOWN_SOURCE_NAME}.
|
|
59
|
-
String get sourceName;
|
|
60
|
-
|
|
61
|
-
/// Set the [TokenFactory] this token source should use for creating
|
|
62
|
-
/// [Token] objects from the input.
|
|
63
|
-
///
|
|
64
|
-
/// @param factory The [TokenFactory] to use for creating tokens.
|
|
65
|
-
set tokenFactory(TokenFactory factory);
|
|
66
|
-
|
|
67
|
-
/// Gets the [TokenFactory] this token source is currently using for
|
|
68
|
-
/// creating [Token] objects from the input.
|
|
69
|
-
///
|
|
70
|
-
/// @return The [TokenFactory] currently used by this token source.
|
|
71
|
-
TokenFactory get tokenFactory;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/// Provides an implementation of [TokenSource] as a wrapper around a list
|
|
75
|
-
/// of [Token] objects.
|
|
76
|
-
///
|
|
77
|
-
/// <p>If the final token in the list is an {@link Token#EOF} token, it will be used
|
|
78
|
-
/// as the EOF token for every call to {@link #nextToken} after the end of the
|
|
79
|
-
/// list is reached. Otherwise, an EOF token will be created.</p>
|
|
80
|
-
class ListTokenSource implements TokenSource {
|
|
81
|
-
/// The wrapped collection of [Token] objects to return.
|
|
82
|
-
final List<Token> tokens;
|
|
83
|
-
|
|
84
|
-
final String _sourceName;
|
|
85
|
-
|
|
86
|
-
/// The index into {@link #tokens} of token to return by the next call to
|
|
87
|
-
/// {@link #nextToken}. The end of the input is indicated by this value
|
|
88
|
-
/// being greater than or equal to the number of items in {@link #tokens}.
|
|
89
|
-
int i;
|
|
90
|
-
|
|
91
|
-
/// This field caches the EOF token for the token source.
|
|
92
|
-
Token eofToken;
|
|
93
|
-
|
|
94
|
-
/// This is the backing field for {@link #getTokenFactory} and
|
|
95
|
-
/// [setTokenFactory].
|
|
96
|
-
@override
|
|
97
|
-
TokenFactory tokenFactory = CommonTokenFactory.DEFAULT;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Constructs a new [ListTokenSource] instance from the specified
|
|
101
|
-
* collection of [Token] objects.
|
|
102
|
-
*
|
|
103
|
-
* @param tokens The collection of [Token] objects to provide as a
|
|
104
|
-
* [TokenSource].
|
|
105
|
-
* @exception NullPointerException if [tokens] is null
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
/// Constructs a new [ListTokenSource] instance from the specified
|
|
109
|
-
/// collection of [Token] objects and source name.
|
|
110
|
-
///
|
|
111
|
-
/// @param tokens The collection of [Token] objects to provide as a
|
|
112
|
-
/// [TokenSource].
|
|
113
|
-
/// @param sourceName The name of the [TokenSource]. If this value is
|
|
114
|
-
/// null, {@link #getSourceName} will attempt to infer the name from
|
|
115
|
-
/// the next [Token] (or the previous token if the end of the input has
|
|
116
|
-
/// been reached).
|
|
117
|
-
///
|
|
118
|
-
/// @exception NullPointerException if [tokens] is null
|
|
119
|
-
ListTokenSource(this.tokens, [this._sourceName]) {
|
|
120
|
-
if (tokens == null) {
|
|
121
|
-
throw ArgumentError.notNull('tokens');
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/// {@inheritDoc}
|
|
126
|
-
|
|
127
|
-
@override
|
|
128
|
-
int get charPositionInLine {
|
|
129
|
-
if (i < tokens.length) {
|
|
130
|
-
return tokens[i].charPositionInLine;
|
|
131
|
-
} else if (eofToken != null) {
|
|
132
|
-
return eofToken.charPositionInLine;
|
|
133
|
-
} else if (tokens.isNotEmpty) {
|
|
134
|
-
// have to calculate the result from the line/column of the previous
|
|
135
|
-
// token, along with the text of the token.
|
|
136
|
-
final lastToken = tokens[tokens.length - 1];
|
|
137
|
-
final tokenText = lastToken.text;
|
|
138
|
-
if (tokenText != null) {
|
|
139
|
-
final lastNewLine = tokenText.lastIndexOf('\n');
|
|
140
|
-
if (lastNewLine >= 0) {
|
|
141
|
-
return tokenText.length - lastNewLine - 1;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return lastToken.charPositionInLine +
|
|
146
|
-
lastToken.stopIndex -
|
|
147
|
-
lastToken.startIndex +
|
|
148
|
-
1;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// only reach this if tokens is empty, meaning EOF occurs at the first
|
|
152
|
-
// position in the input
|
|
153
|
-
return 0;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/// {@inheritDoc}
|
|
157
|
-
|
|
158
|
-
@override
|
|
159
|
-
Token nextToken() {
|
|
160
|
-
if (i >= tokens.length) {
|
|
161
|
-
if (eofToken == null) {
|
|
162
|
-
var start = -1;
|
|
163
|
-
if (tokens.isNotEmpty) {
|
|
164
|
-
final previousStop = tokens[tokens.length - 1].stopIndex;
|
|
165
|
-
if (previousStop != -1) {
|
|
166
|
-
start = previousStop + 1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
final stop = max(-1, start - 1);
|
|
171
|
-
eofToken = tokenFactory.create(Token.EOF, 'EOF', Pair(this, inputStream),
|
|
172
|
-
Token.DEFAULT_CHANNEL, start, stop, line, charPositionInLine);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return eofToken;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
final t = tokens[i];
|
|
179
|
-
if (i == tokens.length - 1 && t.type == Token.EOF) {
|
|
180
|
-
eofToken = t;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
i++;
|
|
184
|
-
return t;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/// {@inheritDoc}
|
|
188
|
-
|
|
189
|
-
@override
|
|
190
|
-
int get line {
|
|
191
|
-
if (i < tokens.length) {
|
|
192
|
-
return tokens[i].line;
|
|
193
|
-
} else if (eofToken != null) {
|
|
194
|
-
return eofToken.line;
|
|
195
|
-
} else if (tokens.isNotEmpty) {
|
|
196
|
-
// have to calculate the result from the line/column of the previous
|
|
197
|
-
// token, along with the text of the token.
|
|
198
|
-
final lastToken = tokens[tokens.length - 1];
|
|
199
|
-
var line = lastToken.line;
|
|
200
|
-
|
|
201
|
-
final tokenText = lastToken.text;
|
|
202
|
-
if (tokenText != null) {
|
|
203
|
-
for (var i = 0; i < tokenText.length; i++) {
|
|
204
|
-
if (tokenText[i] == '\n') {
|
|
205
|
-
line++;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// if no text is available, assume the token did not contain any newline characters.
|
|
211
|
-
return line;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// only reach this if tokens is empty, meaning EOF occurs at the first
|
|
215
|
-
// position in the input
|
|
216
|
-
return 1;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/// {@inheritDoc}
|
|
220
|
-
|
|
221
|
-
@override
|
|
222
|
-
CharStream get inputStream {
|
|
223
|
-
if (i < tokens.length) {
|
|
224
|
-
return tokens[i].inputStream;
|
|
225
|
-
} else if (eofToken != null) {
|
|
226
|
-
return eofToken.inputStream;
|
|
227
|
-
} else if (tokens.isNotEmpty) {
|
|
228
|
-
return tokens[tokens.length - 1].inputStream;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// no input stream information is available
|
|
232
|
-
return null;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/// The name of the input source. If this value is null, a call to
|
|
236
|
-
/// {@link #getSourceName} should return the source name used to create the
|
|
237
|
-
/// the next token in {@link #tokens} (or the previous token if the end of
|
|
238
|
-
/// the input has been reached).
|
|
239
|
-
@override
|
|
240
|
-
String get sourceName =>_sourceName ?? inputStream?.sourceName ?? 'List';
|
|
241
|
-
}
|