File tree 4 files changed +42
-2
lines changed
kotlin/org/rust/lang/core/parser
test/resources/org/rust/lang/core/parser/fixtures/complete
4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -708,7 +708,7 @@ upper ModDeclItem ::= unsafe? mod identifier ';' {
708
708
elementTypeFactory = "org.rust.lang.core.stubs.StubImplementationsKt.factory"
709
709
}
710
710
711
- upper ForeignModItem ::= ExternAbi ForeignModBody {
711
+ upper ForeignModItem ::= unsafe? ExternAbi ForeignModBody {
712
712
name = ""
713
713
implements = [ "org.rust.lang.core.psi.ext.RsItemElement"
714
714
"org.rust.lang.core.psi.ext.RsInnerAttributeOwner" ]
Original file line number Diff line number Diff line change @@ -104,6 +104,6 @@ class RustParserDefinition : ParserDefinition {
104
104
/* *
105
105
* Should be increased after any change of parser rules
106
106
*/
107
- const val PARSER_VERSION : Int = LEXER_VERSION + 30
107
+ const val PARSER_VERSION : Int = LEXER_VERSION + 31
108
108
}
109
109
}
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ extern "C" {}
16
16
extern "R\u{0075} st" { }
17
17
extern r"system" { }
18
18
extern 'C' { } // semantically invalid
19
+ pub extern { } // semantically invalid
20
+ unsafe extern { } // semantically invalid
21
+ pub unsafe extern { } // semantically invalid
Original file line number Diff line number Diff line change @@ -193,4 +193,41 @@ FILE
193
193
PsiElement({)('{')
194
194
PsiElement(})('}')
195
195
PsiWhiteSpace(' ')
196
+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
197
+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
198
+ PsiWhiteSpace('\n')
199
+ RsVisImpl(VIS)
200
+ PsiElement(pub)('pub')
201
+ PsiWhiteSpace(' ')
202
+ RsExternAbiImpl(EXTERN_ABI)
203
+ PsiElement(extern)('extern')
204
+ PsiWhiteSpace(' ')
205
+ PsiElement({)('{')
206
+ PsiElement(})('}')
207
+ PsiWhiteSpace(' ')
208
+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
209
+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
210
+ PsiWhiteSpace('\n')
211
+ PsiElement(unsafe)('unsafe')
212
+ PsiWhiteSpace(' ')
213
+ RsExternAbiImpl(EXTERN_ABI)
214
+ PsiElement(extern)('extern')
215
+ PsiWhiteSpace(' ')
216
+ PsiElement({)('{')
217
+ PsiElement(})('}')
218
+ PsiWhiteSpace(' ')
219
+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
220
+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
221
+ PsiWhiteSpace('\n')
222
+ RsVisImpl(VIS)
223
+ PsiElement(pub)('pub')
224
+ PsiWhiteSpace(' ')
225
+ PsiElement(unsafe)('unsafe')
226
+ PsiWhiteSpace(' ')
227
+ RsExternAbiImpl(EXTERN_ABI)
228
+ PsiElement(extern)('extern')
229
+ PsiWhiteSpace(' ')
230
+ PsiElement({)('{')
231
+ PsiElement(})('}')
232
+ PsiWhiteSpace(' ')
196
233
PsiComment(<EOL_COMMENT>)('// semantically invalid')
You can’t perform that action at this time.
0 commit comments