@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,567 +0,0 @@
|
|
|
1
|
-
parser grammar ApexParser;
|
|
2
|
-
options {tokenVocab=ApexLexer;}
|
|
3
|
-
|
|
4
|
-
//@parser::members {
|
|
5
|
-
// public void clearCache() {
|
|
6
|
-
// _interp.clearDFA();
|
|
7
|
-
// }
|
|
8
|
-
//}
|
|
9
|
-
|
|
10
|
-
// entry point for Apex trigger files
|
|
11
|
-
triggerUnit
|
|
12
|
-
: TRIGGER id ON id LPAREN triggerCase (COMMA triggerCase)* RPAREN block EOF
|
|
13
|
-
;
|
|
14
|
-
|
|
15
|
-
triggerCase
|
|
16
|
-
: (BEFORE|AFTER) (INSERT|UPDATE|DELETE|UNDELETE)
|
|
17
|
-
;
|
|
18
|
-
|
|
19
|
-
// entry point for Apex class files
|
|
20
|
-
compilationUnit
|
|
21
|
-
: typeDeclaration EOF
|
|
22
|
-
;
|
|
23
|
-
|
|
24
|
-
typeDeclaration
|
|
25
|
-
: DOC_COMMENT? modifier* classDeclaration # TypeClassDeclaration
|
|
26
|
-
| DOC_COMMENT? modifier* enumDeclaration # TypeEnumDeclaration
|
|
27
|
-
| DOC_COMMENT? modifier* interfaceDeclaration # TypeInterfaceDeclaration
|
|
28
|
-
;
|
|
29
|
-
|
|
30
|
-
classDeclaration
|
|
31
|
-
: CLASS id
|
|
32
|
-
(EXTENDS typeRef)?
|
|
33
|
-
(IMPLEMENTS typeList)?
|
|
34
|
-
classBody
|
|
35
|
-
;
|
|
36
|
-
|
|
37
|
-
enumDeclaration
|
|
38
|
-
: ENUM id
|
|
39
|
-
LBRACE enumConstants? RBRACE
|
|
40
|
-
;
|
|
41
|
-
|
|
42
|
-
enumConstants
|
|
43
|
-
: id (COMMA id)*
|
|
44
|
-
;
|
|
45
|
-
|
|
46
|
-
interfaceDeclaration
|
|
47
|
-
: INTERFACE id (EXTENDS typeList)? interfaceBody
|
|
48
|
-
;
|
|
49
|
-
|
|
50
|
-
typeList
|
|
51
|
-
: typeRef (COMMA typeRef)*
|
|
52
|
-
;
|
|
53
|
-
|
|
54
|
-
classBody
|
|
55
|
-
: LBRACE classBodyDeclaration* RBRACE
|
|
56
|
-
;
|
|
57
|
-
|
|
58
|
-
interfaceBody
|
|
59
|
-
: LBRACE interfaceMethodDeclaration* RBRACE
|
|
60
|
-
;
|
|
61
|
-
|
|
62
|
-
classBodyDeclaration
|
|
63
|
-
: SEMI # EmptyClassBodyDeclaration
|
|
64
|
-
| STATIC? block # StaticBlockClassBodyDeclaration
|
|
65
|
-
| DOC_COMMENT? modifier* memberDeclaration # MemberClassBodyDeclaration
|
|
66
|
-
;
|
|
67
|
-
|
|
68
|
-
/* Unify all annotation & modifiers so we can give better error messages */
|
|
69
|
-
modifier
|
|
70
|
-
: annotation
|
|
71
|
-
| GLOBAL
|
|
72
|
-
| PUBLIC
|
|
73
|
-
| PROTECTED
|
|
74
|
-
| PRIVATE
|
|
75
|
-
| TRANSIENT
|
|
76
|
-
| STATIC
|
|
77
|
-
| ABSTRACT
|
|
78
|
-
| FINAL
|
|
79
|
-
| WEBSERVICE
|
|
80
|
-
| OVERRIDE
|
|
81
|
-
| VIRTUAL
|
|
82
|
-
| TESTMETHOD
|
|
83
|
-
| WITH SHARING
|
|
84
|
-
| WITHOUT SHARING
|
|
85
|
-
| INHERITED SHARING
|
|
86
|
-
;
|
|
87
|
-
|
|
88
|
-
memberDeclaration
|
|
89
|
-
: methodDeclaration # MethodMemberDeclaration
|
|
90
|
-
| fieldDeclaration # FieldMemberDeclaration
|
|
91
|
-
| constructorDeclaration # ConstructorMemberDeclaration
|
|
92
|
-
| interfaceDeclaration # InterfaceMemberDeclaration
|
|
93
|
-
| classDeclaration # ClassMemberDeclaration
|
|
94
|
-
| enumDeclaration # EnumMemberDeclaration
|
|
95
|
-
| propertyDeclaration # PropertyMemberDeclaration
|
|
96
|
-
;
|
|
97
|
-
|
|
98
|
-
/* We use rule this even for void methods which cannot have [] after parameters.
|
|
99
|
-
This simplifies grammar and we can consider void to be a type, which
|
|
100
|
-
renders the [] matching as a context-sensitive issue or a semantic check
|
|
101
|
-
for invalid return type after parsing.
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
methodDeclaration
|
|
106
|
-
: (typeRef|VOID) id formalParameters
|
|
107
|
-
( block
|
|
108
|
-
| SEMI
|
|
109
|
-
)
|
|
110
|
-
;
|
|
111
|
-
|
|
112
|
-
constructorDeclaration
|
|
113
|
-
: qualifiedName formalParameters block
|
|
114
|
-
;
|
|
115
|
-
|
|
116
|
-
fieldDeclaration
|
|
117
|
-
: typeRef variableDeclarators SEMI
|
|
118
|
-
;
|
|
119
|
-
|
|
120
|
-
propertyDeclaration
|
|
121
|
-
: typeRef id LBRACE propertyBlock* RBRACE
|
|
122
|
-
;
|
|
123
|
-
|
|
124
|
-
interfaceMethodDeclaration
|
|
125
|
-
: DOC_COMMENT? modifier* (typeRef|VOID) id formalParameters SEMI
|
|
126
|
-
;
|
|
127
|
-
|
|
128
|
-
variableDeclarators
|
|
129
|
-
: variableDeclarator (COMMA variableDeclarator)*
|
|
130
|
-
;
|
|
131
|
-
|
|
132
|
-
variableDeclarator
|
|
133
|
-
: id (ASSIGN expression)?
|
|
134
|
-
;
|
|
135
|
-
|
|
136
|
-
arrayInitializer
|
|
137
|
-
: LBRACE (expression (COMMA expression)* (COMMA)? )? RBRACE
|
|
138
|
-
;
|
|
139
|
-
|
|
140
|
-
typeRef
|
|
141
|
-
: typeName (DOT typeName)* arraySubscripts
|
|
142
|
-
;
|
|
143
|
-
|
|
144
|
-
arraySubscripts
|
|
145
|
-
: (LBRACK RBRACK)*
|
|
146
|
-
;
|
|
147
|
-
|
|
148
|
-
typeName
|
|
149
|
-
: LIST typeArguments?
|
|
150
|
-
| SET typeArguments?
|
|
151
|
-
| MAP typeArguments?
|
|
152
|
-
| id typeArguments?
|
|
153
|
-
;
|
|
154
|
-
|
|
155
|
-
typeArguments
|
|
156
|
-
: LT typeList GT
|
|
157
|
-
;
|
|
158
|
-
|
|
159
|
-
formalParameters
|
|
160
|
-
: LPAREN formalParameterList? RPAREN
|
|
161
|
-
;
|
|
162
|
-
|
|
163
|
-
formalParameterList
|
|
164
|
-
: formalParameter (COMMA formalParameter)*
|
|
165
|
-
;
|
|
166
|
-
|
|
167
|
-
formalParameter
|
|
168
|
-
: modifier* typeRef id
|
|
169
|
-
;
|
|
170
|
-
|
|
171
|
-
qualifiedName
|
|
172
|
-
: id (DOT id)*
|
|
173
|
-
;
|
|
174
|
-
|
|
175
|
-
literal
|
|
176
|
-
: IntegerLiteral
|
|
177
|
-
| NumberLiteral
|
|
178
|
-
| StringLiteral
|
|
179
|
-
| BooleanLiteral
|
|
180
|
-
| NULL
|
|
181
|
-
;
|
|
182
|
-
|
|
183
|
-
// ANNOTATIONS
|
|
184
|
-
|
|
185
|
-
annotation
|
|
186
|
-
: AT qualifiedName ( LPAREN ( elementValuePairs | elementValue )? RPAREN )?
|
|
187
|
-
;
|
|
188
|
-
|
|
189
|
-
elementValuePairs
|
|
190
|
-
: elementValuePair (COMMA? elementValuePair)*
|
|
191
|
-
;
|
|
192
|
-
|
|
193
|
-
elementValuePair
|
|
194
|
-
: id ASSIGN elementValue
|
|
195
|
-
;
|
|
196
|
-
|
|
197
|
-
elementValue
|
|
198
|
-
: expression
|
|
199
|
-
| annotation
|
|
200
|
-
| elementValueArrayInitializer
|
|
201
|
-
;
|
|
202
|
-
|
|
203
|
-
elementValueArrayInitializer
|
|
204
|
-
: LBRACE (elementValue (COMMA elementValue)*)? (COMMA)? RBRACE
|
|
205
|
-
;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
// STATEMENTS / BLOCKS
|
|
209
|
-
|
|
210
|
-
block
|
|
211
|
-
: LBRACE statement* RBRACE
|
|
212
|
-
;
|
|
213
|
-
|
|
214
|
-
localVariableDeclarationStatement
|
|
215
|
-
: localVariableDeclaration SEMI
|
|
216
|
-
;
|
|
217
|
-
|
|
218
|
-
localVariableDeclaration
|
|
219
|
-
: modifier* typeRef variableDeclarators
|
|
220
|
-
;
|
|
221
|
-
|
|
222
|
-
statement
|
|
223
|
-
: block
|
|
224
|
-
| ifStatement
|
|
225
|
-
| switchStatement
|
|
226
|
-
| forStatement
|
|
227
|
-
| whileStatement
|
|
228
|
-
| doWhileStatement
|
|
229
|
-
| tryStatement
|
|
230
|
-
| returnStatement
|
|
231
|
-
| throwStatement
|
|
232
|
-
| breakStatement
|
|
233
|
-
| continueStatement
|
|
234
|
-
| insertStatement
|
|
235
|
-
| updateStatement
|
|
236
|
-
| deleteStatement
|
|
237
|
-
| undeleteStatement
|
|
238
|
-
| upsertStatement
|
|
239
|
-
| mergeStatement
|
|
240
|
-
| runAsStatement
|
|
241
|
-
| localVariableDeclarationStatement
|
|
242
|
-
| expressionStatement
|
|
243
|
-
;
|
|
244
|
-
|
|
245
|
-
ifStatement
|
|
246
|
-
: IF parExpression statement (ELSE statement)?
|
|
247
|
-
;
|
|
248
|
-
|
|
249
|
-
switchStatement
|
|
250
|
-
: SWITCH ON expression LBRACE whenControl+ RBRACE
|
|
251
|
-
;
|
|
252
|
-
|
|
253
|
-
whenControl
|
|
254
|
-
: WHEN whenValue block
|
|
255
|
-
;
|
|
256
|
-
|
|
257
|
-
whenValue
|
|
258
|
-
: ELSE
|
|
259
|
-
| whenLiteral (COMMA whenLiteral)*
|
|
260
|
-
| id id
|
|
261
|
-
;
|
|
262
|
-
|
|
263
|
-
whenLiteral
|
|
264
|
-
: (SUB)? IntegerLiteral
|
|
265
|
-
| StringLiteral
|
|
266
|
-
| NULL
|
|
267
|
-
| id
|
|
268
|
-
;
|
|
269
|
-
|
|
270
|
-
forStatement
|
|
271
|
-
: FOR LPAREN forControl RPAREN statement
|
|
272
|
-
;
|
|
273
|
-
|
|
274
|
-
whileStatement
|
|
275
|
-
: WHILE parExpression statement
|
|
276
|
-
;
|
|
277
|
-
|
|
278
|
-
doWhileStatement
|
|
279
|
-
: DO statement WHILE parExpression SEMI
|
|
280
|
-
;
|
|
281
|
-
|
|
282
|
-
tryStatement
|
|
283
|
-
: TRY block (catchClause+ finallyBlock? | finallyBlock)
|
|
284
|
-
;
|
|
285
|
-
|
|
286
|
-
returnStatement
|
|
287
|
-
: RETURN expression? SEMI
|
|
288
|
-
;
|
|
289
|
-
|
|
290
|
-
throwStatement
|
|
291
|
-
: THROW expression SEMI
|
|
292
|
-
;
|
|
293
|
-
|
|
294
|
-
breakStatement
|
|
295
|
-
: BREAK SEMI
|
|
296
|
-
;
|
|
297
|
-
|
|
298
|
-
continueStatement
|
|
299
|
-
: CONTINUE SEMI
|
|
300
|
-
;
|
|
301
|
-
|
|
302
|
-
insertStatement
|
|
303
|
-
: INSERT expression SEMI
|
|
304
|
-
;
|
|
305
|
-
|
|
306
|
-
updateStatement
|
|
307
|
-
: UPDATE expression SEMI
|
|
308
|
-
;
|
|
309
|
-
|
|
310
|
-
deleteStatement
|
|
311
|
-
: DELETE expression SEMI
|
|
312
|
-
;
|
|
313
|
-
|
|
314
|
-
undeleteStatement
|
|
315
|
-
: UNDELETE expression SEMI
|
|
316
|
-
;
|
|
317
|
-
|
|
318
|
-
upsertStatement
|
|
319
|
-
: UPSERT expression qualifiedName? SEMI
|
|
320
|
-
;
|
|
321
|
-
|
|
322
|
-
mergeStatement
|
|
323
|
-
: MERGE expression expression SEMI
|
|
324
|
-
;
|
|
325
|
-
|
|
326
|
-
runAsStatement
|
|
327
|
-
: SYSTEMRUNAS LPAREN expressionList? RPAREN block
|
|
328
|
-
;
|
|
329
|
-
|
|
330
|
-
expressionStatement
|
|
331
|
-
: expression SEMI
|
|
332
|
-
;
|
|
333
|
-
|
|
334
|
-
propertyBlock
|
|
335
|
-
: modifier* (getter | setter)
|
|
336
|
-
;
|
|
337
|
-
|
|
338
|
-
getter
|
|
339
|
-
: GET (SEMI | block)
|
|
340
|
-
;
|
|
341
|
-
|
|
342
|
-
setter
|
|
343
|
-
: SET (SEMI | block)
|
|
344
|
-
;
|
|
345
|
-
|
|
346
|
-
catchClause
|
|
347
|
-
: CATCH LPAREN modifier* qualifiedName id RPAREN block
|
|
348
|
-
;
|
|
349
|
-
|
|
350
|
-
finallyBlock
|
|
351
|
-
: FINALLY block
|
|
352
|
-
;
|
|
353
|
-
|
|
354
|
-
forControl
|
|
355
|
-
: enhancedForControl
|
|
356
|
-
| forInit? SEMI expression? SEMI forUpdate?
|
|
357
|
-
;
|
|
358
|
-
|
|
359
|
-
forInit
|
|
360
|
-
: localVariableDeclaration
|
|
361
|
-
| expressionList
|
|
362
|
-
;
|
|
363
|
-
|
|
364
|
-
enhancedForControl
|
|
365
|
-
: typeRef id COLON expression
|
|
366
|
-
;
|
|
367
|
-
|
|
368
|
-
forUpdate
|
|
369
|
-
: expressionList
|
|
370
|
-
;
|
|
371
|
-
|
|
372
|
-
// EXPRESSIONS
|
|
373
|
-
|
|
374
|
-
parExpression
|
|
375
|
-
: LPAREN expression RPAREN
|
|
376
|
-
;
|
|
377
|
-
|
|
378
|
-
expressionList
|
|
379
|
-
: expression (COMMA expression)*
|
|
380
|
-
;
|
|
381
|
-
|
|
382
|
-
expression
|
|
383
|
-
: primary # primaryExpression
|
|
384
|
-
| expression (DOT | QUESTIONDOT)
|
|
385
|
-
( dotMethodCall
|
|
386
|
-
| anyId
|
|
387
|
-
) # dotExpression
|
|
388
|
-
| expression LBRACK expression RBRACK # arrayExpression
|
|
389
|
-
| methodCall # methodCallExpression
|
|
390
|
-
| NEW creator # newExpression
|
|
391
|
-
| LPAREN typeRef RPAREN expression # castExpression
|
|
392
|
-
| expression (INC | DEC) # postOpExpression
|
|
393
|
-
| (ADD|SUB|INC|DEC) expression # preOpExpression
|
|
394
|
-
| (TILDE|BANG) expression # negExpression
|
|
395
|
-
| expression (MUL|DIV|MOD) expression # arth1Expression
|
|
396
|
-
| expression (ADD|SUB) expression # arth2Expression
|
|
397
|
-
| expression (LT LT | GT GT GT | GT GT) expression # bitExpression
|
|
398
|
-
| expression (GT | LT) ASSIGN? expression # cmpExpression
|
|
399
|
-
| expression INSTANCEOF typeRef # instanceOfExpression
|
|
400
|
-
| expression (TRIPLEEQUAL | TRIPLENOTEQUAL | EQUAL | NOTEQUAL | LESSANDGREATER ) expression # equalityExpression
|
|
401
|
-
| expression BITAND expression # bitAndExpression
|
|
402
|
-
| expression CARET expression # bitNotExpression
|
|
403
|
-
| expression BITOR expression # bitOrExpression
|
|
404
|
-
| expression AND expression # logAndExpression
|
|
405
|
-
| expression OR expression # logOrExpression
|
|
406
|
-
| <assoc=right> expression QUESTION expression COLON expression # condExpression
|
|
407
|
-
| <assoc=right> expression
|
|
408
|
-
( ASSIGN
|
|
409
|
-
| ADD_ASSIGN
|
|
410
|
-
| SUB_ASSIGN
|
|
411
|
-
| MUL_ASSIGN
|
|
412
|
-
| DIV_ASSIGN
|
|
413
|
-
| AND_ASSIGN
|
|
414
|
-
| OR_ASSIGN
|
|
415
|
-
| XOR_ASSIGN
|
|
416
|
-
| RSHIFT_ASSIGN
|
|
417
|
-
| URSHIFT_ASSIGN
|
|
418
|
-
| LSHIFT_ASSIGN
|
|
419
|
-
| MOD_ASSIGN
|
|
420
|
-
)
|
|
421
|
-
expression # assignExpression
|
|
422
|
-
;
|
|
423
|
-
|
|
424
|
-
primary
|
|
425
|
-
: LPAREN expression RPAREN # subPrimary
|
|
426
|
-
| THIS # thisPrimary
|
|
427
|
-
| SUPER # superPrimary
|
|
428
|
-
| literal # literalPrimary
|
|
429
|
-
| typeRef DOT CLASS # typeRefPrimary
|
|
430
|
-
| id # idPrimary
|
|
431
|
-
| soqlLiteral # soqlPrimary
|
|
432
|
-
;
|
|
433
|
-
|
|
434
|
-
methodCall
|
|
435
|
-
: id LPAREN expressionList? RPAREN
|
|
436
|
-
| THIS LPAREN expressionList? RPAREN
|
|
437
|
-
| SUPER LPAREN expressionList? RPAREN
|
|
438
|
-
;
|
|
439
|
-
|
|
440
|
-
dotMethodCall
|
|
441
|
-
: anyId LPAREN expressionList? RPAREN
|
|
442
|
-
;
|
|
443
|
-
|
|
444
|
-
creator
|
|
445
|
-
: createdName (noRest | classCreatorRest | arrayCreatorRest | mapCreatorRest | setCreatorRest)
|
|
446
|
-
;
|
|
447
|
-
|
|
448
|
-
createdName
|
|
449
|
-
: idCreatedNamePair (DOT idCreatedNamePair)*
|
|
450
|
-
;
|
|
451
|
-
|
|
452
|
-
idCreatedNamePair
|
|
453
|
-
: anyId (LT typeList GT)?
|
|
454
|
-
;
|
|
455
|
-
|
|
456
|
-
noRest
|
|
457
|
-
: LBRACE RBRACE
|
|
458
|
-
;
|
|
459
|
-
|
|
460
|
-
classCreatorRest
|
|
461
|
-
: arguments
|
|
462
|
-
;
|
|
463
|
-
|
|
464
|
-
arrayCreatorRest
|
|
465
|
-
: LBRACK expression RBRACK
|
|
466
|
-
| LBRACK RBRACK arrayInitializer?
|
|
467
|
-
;
|
|
468
|
-
|
|
469
|
-
mapCreatorRest
|
|
470
|
-
: LBRACE mapCreatorRestPair (COMMA mapCreatorRestPair )* RBRACE
|
|
471
|
-
;
|
|
472
|
-
|
|
473
|
-
mapCreatorRestPair
|
|
474
|
-
: expression MAPTO expression
|
|
475
|
-
;
|
|
476
|
-
|
|
477
|
-
setCreatorRest
|
|
478
|
-
: LBRACE expression (COMMA ( expression ))* RBRACE
|
|
479
|
-
;
|
|
480
|
-
|
|
481
|
-
arguments
|
|
482
|
-
: LPAREN expressionList? RPAREN
|
|
483
|
-
;
|
|
484
|
-
|
|
485
|
-
soqlLiteral
|
|
486
|
-
: LBRACK (soqlLiteral|~RBRACK)*? RBRACK
|
|
487
|
-
;
|
|
488
|
-
|
|
489
|
-
// Some keywords can be used as general identifiers, this is likley an over simplification of the actual
|
|
490
|
-
// rules but devining them from playing with Apex is very difficult. We could let any be used but that
|
|
491
|
-
// can significantly impact the parser performance by creating ambiguities.
|
|
492
|
-
id
|
|
493
|
-
: Identifier
|
|
494
|
-
| AFTER
|
|
495
|
-
| BEFORE
|
|
496
|
-
| GET
|
|
497
|
-
| INHERITED
|
|
498
|
-
| INSTANCEOF
|
|
499
|
-
| SET
|
|
500
|
-
| SHARING
|
|
501
|
-
| SWITCH
|
|
502
|
-
| TRANSIENT
|
|
503
|
-
| TRIGGER
|
|
504
|
-
| WHEN
|
|
505
|
-
| WITH
|
|
506
|
-
| WITHOUT
|
|
507
|
-
;
|
|
508
|
-
|
|
509
|
-
// In dot expressions we, can use a wider set of of identifiers, apparently any of them althogh I have excluding VOID
|
|
510
|
-
// in the interests of reducing ambiguity
|
|
511
|
-
anyId
|
|
512
|
-
: Identifier
|
|
513
|
-
| ABSTRACT
|
|
514
|
-
| AFTER
|
|
515
|
-
| BEFORE
|
|
516
|
-
| BREAK
|
|
517
|
-
| CATCH
|
|
518
|
-
| CLASS
|
|
519
|
-
| CONTINUE
|
|
520
|
-
| DELETE
|
|
521
|
-
| DO
|
|
522
|
-
| ELSE
|
|
523
|
-
| ENUM
|
|
524
|
-
| EXTENDS
|
|
525
|
-
| FINAL
|
|
526
|
-
| FINALLY
|
|
527
|
-
| FOR
|
|
528
|
-
| GET
|
|
529
|
-
| GLOBAL
|
|
530
|
-
| IF
|
|
531
|
-
| IMPLEMENTS
|
|
532
|
-
| INHERITED
|
|
533
|
-
| INSERT
|
|
534
|
-
| INSTANCEOF
|
|
535
|
-
| INTERFACE
|
|
536
|
-
| LIST
|
|
537
|
-
| MAP
|
|
538
|
-
| MERGE
|
|
539
|
-
| NEW
|
|
540
|
-
| NULL
|
|
541
|
-
| ON
|
|
542
|
-
| OVERRIDE
|
|
543
|
-
| PRIVATE
|
|
544
|
-
| PROTECTED
|
|
545
|
-
| PUBLIC
|
|
546
|
-
| RETURN
|
|
547
|
-
| SET
|
|
548
|
-
| SHARING
|
|
549
|
-
| STATIC
|
|
550
|
-
| SUPER
|
|
551
|
-
| SWITCH
|
|
552
|
-
| TESTMETHOD
|
|
553
|
-
| THIS
|
|
554
|
-
| THROW
|
|
555
|
-
| TRANSIENT
|
|
556
|
-
| TRIGGER
|
|
557
|
-
| TRY
|
|
558
|
-
| UNDELETE
|
|
559
|
-
| UPDATE
|
|
560
|
-
| UPSERT
|
|
561
|
-
| VIRTUAL
|
|
562
|
-
| WEBSERVICE
|
|
563
|
-
| WHEN
|
|
564
|
-
| WHILE
|
|
565
|
-
| WITH
|
|
566
|
-
| WITHOUT
|
|
567
|
-
;
|