Skip to content

Commit

Permalink
add abnf grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 24, 2023
1 parent 0e24600 commit 2f64090
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion doc/grammars/type.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ GenericTypeArgument
/ TokenWildcard

Callable
= TokenParenthesesOpen [CallableParameters] TokenParenthesesClose TokenColon CallableReturnType
= [CallableTemplate] TokenParenthesesOpen [CallableParameters] TokenParenthesesClose TokenColon CallableReturnType

CallableTemplate
= TokenAngleBracketOpen CallableTemplateArgument *(TokenComma CallableTemplateArgument) TokenAngleBracketClose

CallableTemplateArgument
= TokenIdentifier [TokenOf Type]

CallableParameters
= CallableParameter *(TokenComma CallableParameter)
Expand Down Expand Up @@ -192,6 +198,9 @@ TokenIs
TokenNot
= %s"not" 1*ByteHorizontalWs

TokenOf
= %s"of" 1*ByteHorizontalWs

TokenContravariant
= %s"contravariant" 1*ByteHorizontalWs

Expand Down

0 comments on commit 2f64090

Please sign in to comment.