Make 'external' part of external type definitions optional (#63)

pull/844/head
Michael Davis 2023-08-27 19:09:14 +07:00 committed by GitHub
parent 0042037c31
commit a1c34b0286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

@ -197,7 +197,15 @@ module.exports = grammar({
constant_type_argument: ($) => $._constant_type,
external_type: ($) =>
seq(optional($.visibility_modifier), "external", "type", $.type_name),
prec.right(
seq(
optional($.visibility_modifier),
// DEPRECATED: the external token was removed in v0.30.
optional("external"),
"type",
$.type_name
)
),
/* External function */
external_function: ($) =>

@ -81,6 +81,7 @@
"assert"
"case"
"const"
; DEPRECATED: 'external' was removed in v0.30.
"external"
"fn"
"if"

@ -2,9 +2,9 @@
External types
================================================================================
external type IODevice
external type IODevice()
external type Map(key, value)
type IODevice
type IODevice()
type Map(key, value)
--------------------------------------------------------------------------------
@ -27,9 +27,9 @@ external type Map(key, value)
Public external types
================================================================================
pub external type IODevice
pub external type IODevice()
pub external type Map(key, value)
pub type IODevice
pub type IODevice()
pub type Map(key, value)
--------------------------------------------------------------------------------