Add 'var' 'auto' and typed param documentation

This commit is contained in:
Jason Turner 2015-01-19 09:19:31 -07:00
parent 343264944a
commit f0ed3a5cf7

View File

@ -663,6 +663,19 @@
/// ///
/// @sa @ref LangObjectSystemRef /// @sa @ref LangObjectSystemRef
/// ///
///
/// -----------------------------------------------------------------------
///
/// @section keywordauto auto
///
/// Defines a variable
///
/// ~~~~~~~~
/// Variable ::= "auto" identifier
/// ~~~~~~~~
///
/// Synonym for @ref keywordvar
///
/// ----------------------------------------------------------------------- /// -----------------------------------------------------------------------
/// ///
/// @section keywordbreak break /// @section keywordbreak break
@ -682,13 +695,13 @@
/// Begins a function or method definition /// Begins a function or method definition
/// ///
/// ~~~~~~~~ /// ~~~~~~~~
/// Function Definition ::= [annotation + CR/LF] "def" identifier "(" [arg ("," arg)*] ")" [":" guard] block /// Function Definition ::= [annotation + CR/LF] "def" identifier "(" [[type] arg ("," [type] arg)*] ")" [":" guard] block
/// Method Definition ::= [annotation + CR/LF] "def" class_name "::" method_name "(" [arg ("," arg)*] ")" [":" guard] block /// Method Definition ::= [annotation + CR/LF] "def" class_name "::" method_name "(" [[type] arg ("," [type] arg)*] ")" [":" guard] block
/// ~~~~~~~~ /// ~~~~~~~~
/// ///
/// annotation: meta-annotation on function, currently used as documentation. Optional. /// annotation: meta-annotation on function, currently used as documentation. Optional.
/// identifier: name of function. Required. /// identifier: name of function. Required.
/// args: comma-delimited list of parameter names. Optional. /// args: comma-delimited list of parameter names with optional type specifiers. Optional.
/// guards: guarding statement that act as a prerequisite for the function. Optional. /// guards: guarding statement that act as a prerequisite for the function. Optional.
/// { }: scoped block as function body. Required. /// { }: scoped block as function body. Required.
/// ///
@ -765,12 +778,13 @@
/// @section keywordtry try /// @section keywordtry try
/// ~~~~~~~~ /// ~~~~~~~~
/// Try Block ::= "try" block /// Try Block ::= "try" block
/// ("catch" ["(" variable ")"] [":" guards] block)+ /// ("catch" ["(" [type] variable ")"] [":" guards] block)+
/// ["finally" block] /// ["finally" block]
/// ~~~~~~~~ /// ~~~~~~~~
/// ///
/// @sa ChaiScript_Language::throw /// @sa ChaiScript_Language::throw
/// ///
///
/// ----------------------------------------------------------------------- /// -----------------------------------------------------------------------
/// ///
/// @section keywordwhile while /// @section keywordwhile while
@ -782,6 +796,19 @@
/// ~~~~~~~~ /// ~~~~~~~~
/// ///
/// This loop can be broken using the @ref keywordbreak command. /// This loop can be broken using the @ref keywordbreak command.
///
///
/// -----------------------------------------------------------------------
///
/// @section keywordvar var
///
/// Defines a variable
///
/// ~~~~~~~~
/// Variable ::= "var" identifier
/// ~~~~~~~~
///
/// Synonym for @ref keywordauto
/// @namespace chaiscript /// @namespace chaiscript