From 6816856fb1feaf3a8add3d5cd99ec19339849c4e Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sat, 22 Nov 2008 22:16:45 +0000 Subject: [PATCH] Documentation for the plural modifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59885 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/InternalsManual.html | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html index 6ecc5d6149..6434a910e1 100644 --- a/docs/InternalsManual.html +++ b/docs/InternalsManual.html @@ -3,6 +3,11 @@ "clang" CFE Internals Manual + @@ -253,9 +258,33 @@ Clang:

Description:... "plural" format -Example:".." +Example:"you have %1 %plural{1:mouse|:mice}1 connected to + your computer" Classes:Integers -Description:... +Description:

This is a formatter for complex plural forms. + It is designed to handle even the requirements of languages with very + complex plural forms, as many Baltic languages have. The argument consists + of a series of expression/form pairs, separated by ':', where the first form + whose expression evaluates to true is the result of the modifier.

+

An expression can be empty, in which case it is always true. See the + example at the top. Otherwise, it is a series of one or more numeric + conditions, separated by ','. If any condition matches, the expression + matches. Each numeric condition can take one of three forms.

+ +

The parser is very unforgiving. A syntax error, even whitespace, will + abort, as will a failure to match the argument against any + expression.

-- 2.50.1