1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Optional parameter error case, note about keyword parameter fall through

This commit is contained in:
Timothy Clem 2016-11-10 12:51:26 -08:00
parent 9ca3308ea4
commit 3986e0ae1a

View File

@ -49,7 +49,11 @@ termConstructor source sourceSpan name range children
("argument_pair", [ k, v ] ) -> S.Pair k v
("argument_pair", _ ) -> S.Error children
("keyword_parameter", [ k, v ] ) -> S.Pair k v
-- NB: ("keyword_parameter", k) is a required keyword parameter, e.g.:
-- def foo(name:); end
-- Let it fall through to generate an Indexed syntax.
("optional_parameter", [ k, v ] ) -> S.Pair k v
("optional_parameter", _ ) -> S.Error children
("array", _ ) -> S.Array children
("assignment", [ identifier, value ]) -> S.Assignment identifier value
("assignment", _ ) -> S.Error children