Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ module.exports = grammar({
),

associated_type: $ => seq(
optional($.visibility_modifier),
'type',
field('name', $._type_identifier),
field('type_parameters', optional($.type_parameters)),
Expand Down
18 changes: 18 additions & 0 deletions test/corpus/declarations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2091,6 +2091,24 @@ where
(type_identifier)))))))
(block)))

================================================================================
Extern types
================================================================================

extern {
pub type Opaque;
}

--------------------------------------------------------------------------------

(source_file
(foreign_mod_item
(extern_modifier)
(declaration_list
(associated_type
(visibility_modifier)
(type_identifier)))))

================================================================================
Higher-ranked types
================================================================================
Expand Down