Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop

This commit is contained in:
Jason Turner
2014-09-08 11:11:35 -06:00
8 changed files with 34 additions and 20 deletions

View File

@@ -497,6 +497,21 @@
/// print(rect.area())
/// ~~~~~~~~~
///
/// Since ChaiScript 5.4.0 it has been possible to use the "class" keyword to simplify this code.
///
/// ~~~~~~~~~
/// class Rectangle {
/// attr height
/// attr width
/// def Rectangle() { this.height = 10; this.width = 20 }
/// def area() { this.height * this.width }
/// }
///
/// var rect = Rectangle()
/// rect.height = 30
/// print(rect.area())
/// ~~~~~~~~~
///
/// @sa @ref keywordattr
/// @sa @ref keyworddef