Source

frawor / doc / FWC.txt

Diff from to

File doc/FWC.txt

 Integer and floating-point numbers format in FWC is more permissive then vim 
 own format: it allows to use underscore to separate digits to make them more 
 readable, omit numbers before and after the dot, put spaces after sign, ...
-    {float} :: [+-]? " "* ( "inf" | [0-9_]* "."? [0-9_]* ("e" [+-]? [0-9]+)? )
+    {float} :: ( "+" | "-" ) ( "nan" | "inf" | {unum} | {hnum} | {onum} )
+    {unum}  :: ( [1-9] {d}* | 0 )? ( "." {d}* )? ( "e" ( "+" | "-" )? [0-9]+ )?
+       {d}  :: [0-9] | "_"
+    {hnum}  :: "0x" ( [0-9] | [a-f] | [A-F] | "_" )*
+    {onum}  :: "0" ( [0-7] | "_" )+
 All elements are optional (but there must be at least one element), case does 
 not matter:
     FWC       Vim  | FWC      Vim~
 4. A function call (with dot argument undefined), see |FWC-{func}|.
 5. A list, see |FWC-{list}|.
 6. A string, see |FWC-{str}|.
+7. A number, see |FWC-{float}|.
 You can also use parenthesis around variable and use "$" to evaluate {var} at 
 compile time and insert the results: for example, to convert current argument 
 to a string using built-in |string()| function you cannot do `|*string', but 
                  | "*" {func}
                  | {list}
                  | {str}
+                 | ( {float} & ! ( [+-] "inf" | "nan" ) )
                                                                 *FWC-{subscr}*
 Each subscript must start with a dot and be followed by
 1. A word: `.string' will try to access key "string".
     Filter: calls current argument with {var} as an arguments list and 
             replaces it with the result of the call. |self| will be set to 
             a new empty dictionary for this call.
+    Completer: completes to function name which accepts required number of 
+               arguments.
 
 earg                                                             *FWC-f-earg*
     Filter: replaces argument with the result of evaluating itself.
+    Completer: ignored.
 
 not {arg}    (|FWC-{arg}|)                                        *FWC-c-not*
     Checker: fails if processing argument using {arg} succeeds.
             with \, [, ], ? and * escaped). This means that you can use 
             ~ directory shortcut, |:_%|, |:_#|, enviroment variables, 
             |`-expansion| and |`=|.
+    Completer: tries to do something like zsh pathname completion. Always 
+               completes directories.
                     {pathspec} :: [df]? "r"? [wWp]? "x"?
                                 & ! ( "d" | ^ ) "r"
                                 & ! "d" [wWp]? "x"
              (dict.key).
     Filter: checks argument with above rules and if check succeeds, transforms 
             it into a function reference (unless it is a reference already).
+    Completer: completes function names.
 
 isreg                                                            *FWC-c-isreg*
     Checker: checks whether argument is a valid regular expression.
+    Completer: ignored.
 
 bool                                                 *FWC-c-bool* *FWC-f-bool*
     Checker: checks whether argument is 0 or 1 (if |FWC-o-onlystrings| is