add tests

pull/625/head^2
Nikolaj Sidorenco 2024-04-22 17:07:03 +07:00
parent ca523029ed
commit 93bb9b4eeb
No known key found for this signature in database
2 changed files with 36 additions and 1 deletions

@ -1161,7 +1161,7 @@ module.exports = grammar({
argument_name_spec: $ =>
seq(
optional('?'),
$.identifier,
field('name', $.identifier),
':',
),

@ -107,6 +107,41 @@ type A =
(long_identifier
(identifier)))))))))
================================================================================
basic interface definition with optional parameters
================================================================================
type A =
abstract member F: x:int * ?y:int -> int
--------------------------------------------------------------------------------
(file
(type_definition
(anon_type_defn
(type_name
(identifier))
(member_defn
(member_signature
(identifier)
(curried_spec
(arguments_spec
(argument_spec
(argument_name_spec
(identifier))
(type
(long_identifier
(identifier))))
(argument_spec
(argument_name_spec
(identifier))
(type
(long_identifier
(identifier)))))
(type
(long_identifier
(identifier)))))))))
================================================================================
generic interface definition
================================================================================