mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Optional parameter error case, note about keyword parameter fall through
This commit is contained in:
parent
9ca3308ea4
commit
3986e0ae1a
@ -49,7 +49,11 @@ termConstructor source sourceSpan name range children
|
|||||||
("argument_pair", [ k, v ] ) -> S.Pair k v
|
("argument_pair", [ k, v ] ) -> S.Pair k v
|
||||||
("argument_pair", _ ) -> S.Error children
|
("argument_pair", _ ) -> S.Error children
|
||||||
("keyword_parameter", [ k, v ] ) -> S.Pair k v
|
("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", [ k, v ] ) -> S.Pair k v
|
||||||
|
("optional_parameter", _ ) -> S.Error children
|
||||||
("array", _ ) -> S.Array children
|
("array", _ ) -> S.Array children
|
||||||
("assignment", [ identifier, value ]) -> S.Assignment identifier value
|
("assignment", [ identifier, value ]) -> S.Assignment identifier value
|
||||||
("assignment", _ ) -> S.Error children
|
("assignment", _ ) -> S.Error children
|
||||||
|
Loading…
Reference in New Issue
Block a user