Browse Source

Merge branch 'mx2DocsCommunity-wipdocs' into develop

Mark Sibly 8 years ago
parent
commit
65d7756696

+ 11 - 12
docs/index.html

@@ -33,30 +33,30 @@ window.onload=function(){
 	<span class="header_title_strip">
 
 		<span class="header_logo">
-			<a href="http://monkey2.monkey-x.com"><img src="img/monkey2logo_32.png"></a>
+			<a href="http://monkeycoder.co.nz"><img src="img/monkey2logo_32.png"></a>
 		</span>
 
 		<span class="header_text">Monkey 2</span>
-		
+
 	</span>
 
 	<span class="header_button_strip">
 
-		<a class="header_button" href="http://monkey2.monkey-x.com">Blog</a></button>
-		<a class="header_button" href="http://monkey2.monkey-x.com/monkey2-files">Files</a>
-		<a class="header_button" href="http://monkey2.monkey-x.com/forums">Forums</a>
-		<a class="header_button" href="http://monkey2.monkey-x.com/about-monkey-2">About</a>
-	
+		<a class="header_button" href="http://monkeycoder.co.nz">Blog</a></button>
+		<a class="header_button" href="http://monkeycoder.co.nz/monkey2-files">Files</a>
+		<a class="header_button" href="http://monkeycoder.co.nz/forums">Forums</a>
+		<a class="header_button" href="http://monkeycoder.co.nz/about-monkey-2">About</a>
+
 	</span>
-	
+
 	<span class="header_donate_strip">
-	
+
 		<form class="header_paypal" action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_top'>
 			<input type='hidden' name='cmd' value='_s-xclick'>
 			<input type='hidden' name='hosted_button_id' value='SEPSTY3L7J6B6'>
 			<input type='image' class="header_paypal_button" src="img/btn_donate_SM.gif" border='0' name='submit' alt='PayPal - The safer, easier way to pay online!' style='vertical-align:middle'>
 		</form>
-	
+
 		<a class="header_patreon" href="https://www.patreon.com/monkey2">
 			<img src="img/patreon_20.png">
 		</a>
@@ -83,8 +83,7 @@ window.onload=function(){
 </iframe>
 
 </div>
-	
+
 </body>
 
 </html>
-

+ 1 - 1
modules/monkey/docs/articles/articles.md

@@ -1,7 +1,7 @@
 
 @manpage Articles and tutorials
 
-# Articles and tutorials
+Articles and tutorials
 
 This section contains a number of articles and tutorials.
 

+ 42 - 9
modules/monkey/docs/articles/multifile-projects.md

@@ -1,17 +1,17 @@
 
-# Multifile projects and #Import.
+### Multifile projects and #Import.
 
 To add additional source files to a monkey2 project, you use the #Import directive. #Import can also be used to import other stuff into a project, but more on that late
 
 \#Imports should appear at the top of a source file before any declarations occur. #Import takes one parameter – the path to the file to import. If the file is a '.monkey2' file, the extensions can be omitted, eg:
- 
+
 
 ```
 'file1.monkey2
 '
 #Import "file2"
 #Import "file3"
- 
+
 Function Something()
 End
 ```
@@ -29,23 +29,23 @@ Code in any imported monkey2 file can use code in any other imported monkey2 fil
 '
 #Import "file2"
 #Import "file3"
- 
+
 Function Func1()
    Func1()
    Func2()
    Func3()
 End
- 
+
 '***** file2.monkey2 *****
- 
+
 Function Func2()
    Func1()
    Func2()
    Func3()
 End
- 
+
 '***** file3.monkey2 *****
- 
+
 Function Func3()
    Func1()
    Func2()
@@ -55,4 +55,37 @@ End
 
 This is perfectly valid, as long as file1.monkey2 is the ‘root file’ you compile.
 
- 
+You may encapsulate some code within a file by using the `Private` keyword. That code will only be accessible within the file. The `Public` keyword allows you to go back to the default public privacy level.
+
+```
+'***** file1.monkey2 *****
+'
+#Import "file2"
+
+Function Func1()
+   Func1()
+   Func2()
+   Func3() 'this call is not valid, Func3 is private to file2.monkey!
+   Func4()
+End
+
+'***** file2.monkey2 *****
+
+Function Func2()
+   Func1()
+   Func3() 'here the call is valid
+End
+
+Private 'entering private declarations
+
+Function Func3()
+   'some statements
+End
+
+Public 'back to public declarations
+
+Function Func4()
+   'some statements
+End
+
+```

+ 13 - 0
modules/monkey/docs/index/index.md

@@ -0,0 +1,13 @@
+@manpage Index
+
+Monkey2 Language Index
+
+Unfold in TreeView to see Index sections
+
+@import keywords-index.md
+
+@import operators-index.md
+
+@import types-index.md
+
+@import preprocessor-index.md

+ 533 - 0
modules/monkey/docs/index/keywords-index.md

@@ -0,0 +1,533 @@
+@manpage Keywords
+
+#### Abstract
+
+Used while declaring classes: class cannot be instantiated with `New`, it must be extended.
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
+
+#### Alias
+
+Used for convenience types. For example `Vec2i` is a convenience type alias for `Vec2<Int>`.
+
+Used to import extern typedefs too.
+<br>
+<a href="javascript:void('monkey:user-types#alias')" onclick="openDocsPage('monkey:user-types#alias')">See Alias.</a>
+&nbsp;
+
+
+#### Array
+
+`Array` is not currently used but is reserved for future use.
+
+<br>
+<a href="javascript:void('monkey:arrays#arrays')" onclick="openDocsPage('monkey:arrays#arrays')">See arrays.</a>
+&nbsp;
+
+#### Case
+
+To be combined with with the `Select` statement.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#select')" onclick="openDocsPage('monkey:conditional-statements#select')">See Select.</a>
+&nbsp;
+
+#### Cast
+
+Allows you to cast custom pointers.
+
+<br>
+<a href="javascript:void('monkey:pointers#casting')" onclick="openDocsPage('monkey:pointers#casting')">See pointer casting.</a>
+&nbsp;
+
+#### Catch
+
+The `Catch` keyword is part of the Try/Catch exception-handling construct.
+
+<br>
+<a href="javascript:void('monkey:error-handling#error-handling')" onclick="openDocsPage('monkey:error-handling#error-handling')">See error handling.</a>
+&nbsp;
+
+#### Class
+
+Marks the start of a class object definition.
+
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
+
+#### Const
+
+Allows you to declare a constant.
+
+<br>
+<a href="javascript:void('monkey:variables#consts')" onclick="openDocsPage('monkey:variables#consts')">See Consts.</a>
+&nbsp;
+
+#### Continue
+
+Used to skip a loop.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#continue')" onclick="openDocsPage('monkey:loop-statements#continue')">See loops.</a>
+&nbsp;
+
+#### CString
+
+Reserved keyword.
+C style String for external string parameters.
+
+#### Default
+
+Marks the start of the default code block of a `Select` statement.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#select')" onclick="openDocsPage('monkey:conditional-statements#select')">See Select.</a>
+&nbsp;
+
+#### Delete
+
+`Delete` is not currently used but is reserved for future use.
+
+#### Eachin
+
+Allows you to use `For` loop with collections.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#for--eachin')" onclick="openDocsPage('monkey:loop-statements#for--eachin')">See For(Eachin).</a>
+&nbsp;
+
+#### Else
+
+To be combined with the `If` statement.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#if')" onclick="openDocsPage('monkey:conditional-statements#if')">See If.</a>
+&nbsp;
+
+#### Elseif
+
+To be combined with the `If` statement.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#if')" onclick="openDocsPage('monkey:conditional-statements#if')">See If.</a>
+&nbsp;
+
+#### End
+
+Ends all kind of declarations/statements
+
+#### Endif
+
+Ends `If` statement.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#if')" onclick="openDocsPage('monkey:conditional-statements#if')">See If.</a>
+&nbsp;
+
+#### Enum
+
+32 Bit integer Enumerated Type.
+<br>
+<a href="javascript:void('monkey:enums#enums')" onclick="openDocsPage('monkey:enums#enums')">See Enums.</a>
+&nbsp;
+
+#### Exit
+
+Used to terminate a loop.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#exit')" onclick="openDocsPage('monkey:loop-statements#exit')">See Exit.</a>
+&nbsp;
+
+#### Extends
+
+Used for class declaration.
+
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
+
+#### Extension
+
+Used to add some features to an existing user defined type without inheritance.
+
+<br>
+<a href="javascript:void('monkey:user-types#extensions')" onclick="openDocsPage('monkey:user-types#extensions')">See Extensions.</a>
+&nbsp;
+
+#### Extern
+
+Marks the start of definitions for C/C++ imports.
+
+<br>
+<a href="javascript:void('monkey:native-code#integration-with-native-code')" onclick="openDocsPage('monkey:native-code#integration-with-native-code')">See extern native code.</a>
+&nbsp;
+
+#### False
+
+Boolean False value
+
+#### Field
+
+Fields are variables that live inside the memory allocated for an instance of a class or struct.
+
+<br>
+<a href="javascript:void('monkey:user-types#fields')" onclick="openDocsPage('monkey:user-types#fields')">See Fields.</a>
+&nbsp;
+
+#### Final
+
+Methods declared as `Final` are non-virtual and cannot be overridden by a subclass method.
+
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
+
+#### For
+
+Marks the start of a `For` loop
+
+<br>
+<a href="javascript:void('monkey:loop-statements#for--numeric')" onclick="openDocsPage('monkey:loop-statements#for--numeric')">See For loops.</a>
+&nbsp;
+
+#### Forever
+
+Used at the end of a `Repeat` loop. The loop will loop forever unless `Exit` is called.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#repeat')" onclick="openDocsPage('monkey:loop-statements#repeat')">See Repeat loops.</a>
+&nbsp;
+
+#### Friend
+
+`Friend` is not currently used but is reserved for future use.
+
+#### Function
+
+Used to declare a function within a struct, a class or at global scope.
+
+<br>
+<a href="javascript:void('monkey:functions#global-functions')" onclick="openDocsPage('monkey:functions#global-functions')">See global Functions.</a>
+&nbsp;
+
+#### Getter
+
+`Getter` is not currently used but is reserved for future use.
+
+#### Global
+
+Global variables live in global memory and exist for the lifetime of the application.
+
+<br>
+<a href="javascript:void('monkey:variables#global-variables')" onclick="openDocsPage('monkey:variables#global-variables')">See variables.</a>
+&nbsp;
+
+#### If
+
+The `If` statement allows you to conditionally execute a block of statements depending on the result of a series of boolean expressions.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#if')" onclick="openDocsPage('monkey:conditional-statements#if')">See If.</a>
+&nbsp;
+
+#### Implements
+
+Used to declare classes implementing an interface.
+`Implements` can also be combined with `where` to check generics type constrain.
+
+<br>
+<a href="javascript:void('monkey:user-types#interfaces')" onclick="openDocsPage('monkey:user-types#interfaces')">See interfaces.</a>
+&nbsp;
+
+#### Import
+
+Assets and code files can be imported with 'Import'
+
+<br>
+<a href="javascript:void('monkey:modules#importing-modules')" onclick="openDocsPage('monkey:modules#importing-modules')">See modules.</a>
+&nbsp;
+<br>
+<a href="javascript:void('monkey:assets-management#importing-assets')" onclick="openDocsPage('monkey:assets-management#importing-assets')">See assets.</a>
+&nbsp;
+
+#### Inline
+
+`Inline` is not currently used but is reserved for future use.
+
+#### Interface
+
+Interfaces are Class models definition. It's a pure abstract object to be implemented by a `Class`.
+
+<br>
+<a href="javascript:void('monkey:user-types#interfaces')" onclick="openDocsPage('monkey:user-types#interfaces')">See interfaces.</a>
+&nbsp;
+
+#### Internal
+
+`Internal` is not currently used but is reserved for future use.
+
+#### Lambda
+
+A lambda function is a special type of function that can be declared in the middle of an expression.
+
+<br>
+<a href="javascript:void('monkey:functions#lambda-functions')" onclick="openDocsPage('monkey:functions#lambda-functions')">See Lambda functions.</a>
+&nbsp;
+
+#### Local
+
+Local variables live on the stack. They are lost once their scope is exited.
+
+<br>
+<a href="javascript:void('monkey:variables#local-variables')" onclick="openDocsPage('monkey:variables#local-variables')">See variables.</a>
+&nbsp;
+
+#### Method
+
+A Method is special type of function associated with a Class or a Struct. It can acces the object fields.
+
+<br>
+<a href="javascript:void('monkey:user-types#methods')" onclick="openDocsPage('monkey:user-types#methods')">See methods.</a>
+&nbsp;
+
+#### Namespace
+
+All identifiers declared in a monkey2 program file end up inside a 'namespace'.
+
+<br>
+<a href="javascript:void('monkey:namespaces#declaring-namespaces"')" onclick="openDocsPage('monkey:namespaces#declaring-namespaces"')">See Namspaces.</a>
+&nbsp;
+
+#### New
+
+`New` calls a Class, Struct or Array constructor. It must be called before using a Class or an Array. It is advised to call it before using a struct.
+
+#### Next
+
+Used at the end of a `For` loop.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#for--numeric')" onclick="openDocsPage('monkey:loop-statements#for--numeric')">See For loops.</a>
+&nbsp;
+
+#### Operator
+
+`Operator` is used to declare special methods using a set of available expressions (+,-,/,<>,...)
+
+<br>
+<a href="javascript:void('monkey:expressions#operator-overloading')" onclick="openDocsPage('monkey:expressions#operator-overloading')">See Operator overloading.</a>
+&nbsp;
+<br>
+<a href="javascript:void('monkey:operator-overloading#operator-overloading')" onclick="openDocsPage('monkey:operator-overloading#operator-overloading')">See article on Operator overloading.</a>
+&nbsp;
+
+#### Override
+
+Used to override a virtual method when declaring a sub-Class.
+<br>
+<a href="javascript:void('monkey:user-types#classes')" onclick="openDocsPage('monkey:user-types#classes')">See Classes.</a>
+&nbsp;
+
+#### Print
+
+Prints a String or a numeric value to the output console.
+
+#### Private
+
+Sets the acces control of a Class or Struct members to "Private". Private members can only be accessed by the original class OR by any code within the same .monkey2 file.
+
+<br>
+<a href="javascript:void('monkey:user-types#encapsulation')" onclick="openDocsPage('monkey:user-types#encapsulation')">See encapsulation.</a>
+&nbsp;
+
+#### Property
+
+Property is a special type of field that may include some getter/setter additionnal code if desired.
+
+<br>
+<a href="javascript:void('monkey:user-types#properties')" onclick="openDocsPage('monkey:user-types#properties')">See Properties.</a>
+&nbsp;
+
+#### Protected
+
+Sets the acces control of a Class or Struct members to "Protected". Protected members can only be accessed by the original class and subclasses OR by any code within the same .monkey2 file.
+
+<br>
+<a href="javascript:void('monkey:user-types#encapsulation')" onclick="openDocsPage('monkey:user-types#encapsulation')">See encapsulation.</a>
+&nbsp;
+
+#### Protocol
+
+`Protocol` is not currently used but is reserved for future use.
+
+#### Public
+
+Sets the acces control of a Class or Struct members to "Public". Public members can be accessed from anywhere. It's the default level.
+
+<br>
+<a href="javascript:void('monkey:user-types#encapsulation')" onclick="openDocsPage('monkey:user-types#encapsulation')">See encapsulation.</a>
+&nbsp;
+
+#### Repeat
+
+Used to start a `Repeat` loop
+
+<br>
+<a href="javascript:void('monkey:loop-statements#repeat')" onclick="openDocsPage('monkey:loop-statements#repeat')">See Repeat.</a>
+&nbsp;
+
+#### Return
+
+Used to end and return the expected value of a `Function`, `Method` or `Operator`
+
+
+#### Select
+
+The Select statement allows you to execute a block of statements depending on a series of comparisons. `Select` combines with `Case` and `Default`
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#select')" onclick="openDocsPage('monkey:conditional-statements#select')">See Select.</a>
+&nbsp;
+
+#### Setter
+
+Marks the start of a Property setter definition.
+
+<br>
+<a href="javascript:void('monkey:user-types#properties')" onclick="openDocsPage('monkey:user-types#properties')">See Properties.</a>
+&nbsp;
+
+#### Static
+
+`Static` is not currently used but is reserved for future use.
+
+#### Step
+
+Defines the incrementation step for `Next` loops.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#for--numeric')" onclick="openDocsPage('monkey:loop-statements#for--numeric')">See For loops.</a>
+&nbsp;
+
+#### Struct
+
+Used to declare a `Struct`
+
+<br>
+<a href="javascript:void('monkey:user-types#structs')" onclick="openDocsPage('monkey:user-types#structs')">See Structs.</a>
+&nbsp;
+
+#### Then
+
+Facultative keyword used in combination with the `If` keyword.
+
+<br>
+<a href="javascript:void('monkey:conditional-statements#if')" onclick="openDocsPage('monkey:conditional-statements#if')">See If.</a>
+&nbsp;
+
+#### Throw
+
+The `Throw` keyword is part of the Try/Catch exception-handling construct.
+
+<br>
+<a href="javascript:void('monkey:error-handling#error-handling')" onclick="openDocsPage('monkey:error-handling#error-handling')">See error handling.</a>
+&nbsp;
+
+#### Throwable
+
+The Throwable class must be extended by all classes that are intended to be used with `Throw`.
+
+<br>
+<a href="javascript:void('monkey:error-handling#error-handling')" onclick="openDocsPage('monkey:error-handling#error-handling')">See error handling.</a>
+&nbsp;
+
+#### To
+
+Defines range of values to be assigned to the index variable in a For/Next loop.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#for--numeric')" onclick="openDocsPage('monkey:loop-statements#for--numeric')">See For loops.</a>
+&nbsp;
+
+#### Try
+
+Declares the start of a Try/Catch block.
+
+<br>
+<a href="javascript:void('monkey:error-handling#error-handling')" onclick="openDocsPage('monkey:error-handling#error-handling')">See error handling.</a>
+&nbsp;
+
+#### TypeInfo
+
+Returns the type of a variable/object.
+
+<br>
+<a href="javascript:void('monkey:reflection#typeof-and-typeinfo')" onclick="openDocsPage('monkey:reflection#typeof-and-typeinfo')">See relfection.</a>
+&nbsp;
+
+#### Until
+
+Marks the end of a Repeat/Until loop. The `Until` keyword is also found as a modifier in For/Next loops.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#repeat')" onclick="openDocsPage('monkey:loop-statements#repeat')">See Repeat.</a>
+&nbsp;
+
+#### Using
+
+The `Using` directive provides a way to add namespace 'search paths' for locating identifiers.
+
+<br>
+<a href="javascript:void('monkey:namespaces#accessing-namespaces')" onclick="openDocsPage('monkey:namespaces#accessing-namespaces')">See Namespaces.</a>
+&nbsp;
+
+#### Var
+
+`Var` is not currently used but is reserved for future use.
+
+#### Variant
+
+The `Variant` type is a primitive type that can be used to 'box' values of any type.
+
+<br>
+<a href="javascript:void('monkey:variants#variants')" onclick="openDocsPage('monkey:variants#variants')">See Variants.</a>
+&nbsp;
+
+#### Varptr
+
+`Varptr` is used to reference pointers.
+
+<br>
+<a href="javascript:void('monkey:pointers#referencing')" onclick="openDocsPage('monkey:pointers#referencing')">See Pointers.</a>
+&nbsp;
+
+#### Virtual
+
+A virtual method is a method that can be overriden.
+
+<br>
+<a href="javascript:void('monkey:user-types#methods')" onclick="openDocsPage('monkey:user-types#methods')">See methods.</a>
+&nbsp;
+
+#### Wend
+
+Wend, short for While [loop] End, marks the end of a While loop.
+
+<br>
+monkey:loop-statements#while
+&nbsp;
+
+#### Where
+
+`Where` allows generic type constrains.
+
+#### While
+
+Marks the start of a While loop.
+
+<br>
+<a href="javascript:void('monkey:loop-statements#while')" onclick="openDocsPage('monkey:loop-statements#while')">See While.</a>
+&nbsp;

+ 93 - 0
modules/monkey/docs/index/operators-index.md

@@ -0,0 +1,93 @@
+@manpage Operators
+
+####.
+Postfix member acccess
+####( )
+Postfix Invoke
+####[ ]
+Postfix Index
+
+Used for Arrays an Pointers dereferencing
+
+/linkto Arrays \linkto
+
+/linkto Pointers \linkto
+
+####->
+Postfix base Index combined with member acces
+
+equivalent to `[0].`
+
+/linkto Pointers \linkto
+####< >
+Postfix Generic instance
+####-
+Unary numeric negate
+####~
+Unary integer complement
+####Not
+Unary boolean invert
+####*
+Numeric multiplication
+####/
+Numeric division
+####+
+Numeric addition
+####-
+Numeric subtraction
+####&
+Integer and
+####~
+Integer xor
+####|
+Integer or
+####<=>
+Compare
+####<
+Less than
+####>
+Greater than
+####<=
+Less than or equal
+####>=
+Greater than or equal
+####=
+Equal
+####<>
+Not equal
+####? Else
+If-then-else
+####And
+Boolean and
+####Cast
+Cast operator
+####Or
+Boolean or
+####False
+Boolean false
+####Identifier
+Identifier
+####Lambda
+Lambda function
+####Literal
+Literal value
+####Mod
+Numeric modulo
+####New
+New object or array
+####Null
+Null value
+####Self
+Self instance
+####Shl
+Integer shift left
+####Shr
+Integer shift right
+####Super
+Super instance
+####True
+Boolean true
+####Typeof
+Typeof operator
+####Varptr
+Unary variable address

+ 40 - 0
modules/monkey/docs/index/preprocessor-index.md

@@ -0,0 +1,40 @@
+@manpage Preprocessor
+
+#### #If
+The `#If` directive allows you to conditionally execute a block of statements depending on the result of a series of boolean expressions.
+#### #Else if
+To be combined with #if
+#### #Else
+To be combined with #if
+#### #EndIf
+Ends an #if
+#### #Rem
+Used to for multiline comments
+#### #End
+Ends an #if or #rem
+#### #Import
+Used to import modules, code or assets.
+
+<br>
+<a href="javascript:void('monkey:modules#importing-modules')" onclick="openDocsPage('monkey:modules#importing-modules')">See modules.</a>
+&nbsp;
+<br>
+<a href="javascript:void('monkey:assets-management#importing-assets')" onclick="openDocsPage('monkey:assets-management#importing-assets')">See assets.</a>
+&nbsp;
+<br>
+<a href="javascript:void('monkey:multifile-projects#multifile-projects-and--import')" onclick="openDocsPage('monkey:multifile-projects#multifile-projects-and--import')">See multifile projects.</a>
+&nbsp;
+#### __TARGET__
+Is set to one of the following values: “windows”, “macos”, “linux”, “emscripten”, “android” or “ios” – ie: the precise target.
+#### __DESKTOP_TARGET__
+`True` if target is desktop(“windows”, “macos”, “linux”), False otherwise.
+#### __MOBILE_TARGET__
+True if target is mobile(“android” or “ios”), False otherwise.
+#### __WEB_TARGET__
+True if target is web (“emscripten”), False otherwise.
+#### __CONFIG__
+Is set to one of the following values: "debug" or "release"
+#### __DEBUG__
+`True` if the current build config is debug.
+#### __RELEASE__
+`True` if the current build config is release.

+ 36 - 0
modules/monkey/docs/index/types-index.md

@@ -0,0 +1,36 @@
+@manpage Types
+
+####Void
+No type.
+####Bool
+Boolean type.
+####Byte
+8 bit signed integer.
+####UByte
+8 bit unsigned integer.
+####Short
+16 bit signed integer.
+####UShort
+16 bit unsigned integer.
+####Int
+32 bit signed integer.
+####UInt
+32 bit unsigned integer.
+####Long
+64 bit signed integer.
+####ULong
+64 bit signed integer.
+####Float
+32 bit floating point.
+####Double
+64 bit floating point.
+####String
+String of 16 bit characters.
+####Array
+Array type.
+####Enum
+32 bit signed integer enumerated type.
+####Object
+Object type.
+####Ptr
+Pointer type.

+ 96 - 0
modules/monkey/docs/language/assets-management.md

@@ -0,0 +1,96 @@
+### Asset management
+
+Monkey2 provides a simple system for managing assets. This allows you to import and use images, files, fonts, and sounds in a consistent way, regardless of the target platform you are deploying to.
+
+For the following examples, assume a project folder structure like this:
+
+```
+main.monkey2
+images/image1.png
+images/image2.png
+sounds/sound1.wav
+sounds/sound2.wav
+```
+
+#### Importing Assets
+
+Import assets for use in your project by using an Import directive.
+
+```
+'individual files
+
+#Import "relative/local/path/to/your/file"
+
+'entire folders
+
+#Import "relaive/local/path/"
+```
+
+When importing entire folders, Make sure to include the trailing slash at the end to let the compiler know it's a folder.
+
+```
+'import the entire images subfolder
+
+#Import "images/"
+
+'import a specific sound
+
+#Import "sounds/sound1.wav"
+```
+
+These import directives can go anywhere in your source file, but standard practice is to put them at the top of the file.
+
+#### Using Imported Assets
+
+Once you've imported your assets, you can reference them by prefixing the imported filename with `asset::`
+This allows you to use them with a function or method that asks for a String path to a file.
+
+```
+#Import "images/image1.png"
+
+Local myImage:Image = Image.Load("asset::image1.png")
+```
+
+If you imported a folder containing several assets, you can reference any of the assets in this way.
+
+```
+#Import "images/"
+
+Local image1:Image = Image.Load("asset::image1.png")
+Local image2:Image = Image.Load("asset::image2.png")
+
+```
+
+
+#### Importing into a subfolder with "@/"
+
+If you want to maintain a folder structure when importing, you can specify a target subfolder with `@/target/path/` after the path in the import directive.
+
+```
+'imports image1.jpg into a subfolder called images
+
+#Import "images/image1.jpg@/images/"
+```
+
+`@/` also works when importing entire folders:
+
+```
+'imports everything from images/ into a subfolder called images/
+
+#Import "images/@/images/"
+```
+
+The destination folder name doesn't have to be the same as the source folder name.
+```
+'imports everything from images/ into a subfolder called data/
+
+#Import "images/@/data/"
+```
+
+When using the files in your code, make sure to add the target subfolder after `asset::`, for example:
+
+```
+#Import "images/image1.png@data/"
+
+Local image:Image = Image.Load("asset::data/image1.png")
+```

+ 69 - 0
modules/monkey/docs/language/conditional-statements.md

@@ -0,0 +1,69 @@
+### Conditional statements
+
+#### If
+
+The `If` statement allows you to conditionally execute a block of statements depending on the result of a series of boolean expressions.
+
+The first boolean expression that evaluates to true will cause the associated block of statements to be executed. No further boolean expressions will be evaluated.
+
+If no boolean expression evaluates to true, then the final else block will be executed if present.
+
+The syntax for the `If` statement is:
+
+`If` _Expression_ [ `Then` ]
+
+     _Statements..._
+
+`ElseIf` _Expression_ [ `Then` ]
+
+     _Statements..._
+
+`Else`
+
+     _Statements..._
+
+`EndIf`
+
+There may be any number of `ElseIf` blocks, or none. The final `Else` block is optional.
+
+`End` or `End If` may be used instead of `EndIf`, and `Else` If may be used instead of `ElseIf`.
+
+In addition, a simple one line version of `If` is also supported:
+
+`If` _Expression_ [ `Then` ] _Statement_ [ `Else` _Statement_ ]
+
+#### Select
+
+The `Select` statement allows you to execute a block of statements depending on a series of comparisons.
+
+The first comparison to produce a match will cause the associated block of statements to be executed.
+
+If no comparisons produce a match, then the final `Default` block will be executed if present.
+
+The syntax for the `Select` statement is:
+
+`Select` _Expression_
+
+`Case` _Expression_ [ , _Expression_... ]
+
+     _Statements..._
+
+`Default`
+
+     _Statements..._
+
+`End` [ `Select` ]
+
+There may be any number of `Case` blocks, or none. The final `Default` block is optional. If the default block is present, it must appear after all `Case` blocks.
+
+#### ? Else
+
+the `? Else` operator is used to assign a value with a condition:
+
+_variable_=_Expression_ `?` _Expression-A_ `Else` _Expression-B_
+
+the _variable_ will receive the value of _Expression-A_ if _Expression_ is True, else it will receive the value of _Expression-B_.
+
+```
+i=j>2 ? 5 else j+7
+```

+ 55 - 0
modules/monkey/docs/language/enums.md

@@ -0,0 +1,55 @@
+### Enums
+
+`Enum` is a data type containing a set of Int constants.
+
+By default the members will receive values starting from zero and incemented by one for each new member. You can assign a chosen value to each member when declaring them.
+
+```
+Enum myBasicEnum
+	a,b,c 'a=0, b=1, c=2
+End
+```
+```
+Enum myCustomEnum
+	a=7
+	b=31,c,d 'c=32, d=33
+End
+```
+The values can be accessed with the postfix member acces operator (`.`).
+Enums values are implicitly converted to integral values when assigned to it.
+```
+Local i:UInt=myCustomEnum.b
+```
+
+You can also create `Enum` variables. An `Enum` variable contains an Int variable in addition to it's constant members (default value is zero).
+
+Bitwise operators (|,&,~) can be used with Enums variables and Enums members to compute combinations. Such Enums most often contain powers of 2 numbers as members! (1,2,4,8,16,32,64,... and 0 if needed).
+
+A bitmask Enum example:
+```
+Enum Flags 'a classic Enum. (4 bits bitmask)
+	None=0
+  A=$0001 'bin OOOI dec 1
+  B=$0002 'bin OOIO dec 2
+  C=$0004 'bin OIOO dec 4
+  D=$0008 'bin IOOO dec 8
+End
+```
+An enum with modifiers example (in this case the bitwise operators should be used with at least one modifier):
+```
+Enum Foo '(modifiers on 5th and 6th bit)
+	None=0
+	A=1,B,C,D,E,F,G,H,J,K,L,M ' max 15 because the 5th bit is used for modifier
+	Modifier_A=$0010 'bin IOOOO dec 16
+	Modifier_B=$0020 'bin IOOOOO dec 32
+End
+```
+
+For now enums don't accept negative number literals. To assign a negative number you'll have to type a substraction until the bug is resolved.
+```
+Enum Foo '(with a negative member)
+	Negative=0-1 'instead of -1
+	None=0
+	A=1,B,C,D,E,F,G,H,J,K,L,M
+End
+```

+ 55 - 0
modules/monkey/docs/language/error-handling.md

@@ -0,0 +1,55 @@
+### Error handling
+
+A Try/Catch block is an error-handling construct that allows custom code to be executed in situations which may otherwise cause undesirable behaviour.
+
+The Try/Catch block opens with Try and closes with End (or End Try). The code to be executed within must be followed by at least one Catch section.
+
+In the event of an error occurring within the Try/Catch block, an exception object (based on the native Throwable class) should be 'thrown' via the Throw instruction.
+
+If an exception occurs, program flow jumps to a Catch section declared explicitly for the given exception type. The exception object is 'caught' and the relevant error-handling code is executed.
+
+You can declare multiple exception classes to handle different types of exception and should create a matching Catch section for each one.
+
+After an exception is caught and handled, program flow exits the Try/Catch block and continues.
+
+When a Try block has multiple Catch blocks and an exception is thrown, the first Catch block capable of handling the exception is executed. If no suitable Catch block can be found, the exception is passed to the next most recently executed Try block, and so on.
+
+If no Catch block can be found to catch an exception, a runtime error occurs and the application is terminated.
+
+The Try/Catch method of error-handling allows code to be written without the need to manually check for errors at each step, provided an exception has been set up to handle any errors that are likely to be encountered.
+
+Syntax:
+
+`Try`
+
+_...code (sould contain at least one `throw`)..._
+
+`Catch` exception
+
+_...error handling code..._
+
+`End`
+
+Example code:
+
+```
+#Import "<std>"
+Using std..
+
+Class CustomException Extends Throwable
+	Field msg:String
+
+  	Method New (message:String)
+   		Self.msg = message
+  	End
+End
+
+Function Main:Void()
+	Local somethingWrong:=True
+	Try
+		If somethingWrong Then Throw New CustomException ("Custom Exception detected")
+	Catch err:CustomException
+		Print err.msg
+	End
+End
+```

+ 7 - 0
modules/monkey/docs/language/language.md

@@ -13,11 +13,18 @@ Note: This documentation is currently WIP.
 @import arrays.md
 @import strings.md
 @import variants.md
+@import enums.md
 @import variables.md
+@import pointers.md
 @import functions.md
+@import loop-statements.md
+@import conditional-statements.md
 @import expressions.md
 @import user-types.md
 @import preprocessor.md
 @import reflection.md
+@import error-handling.md
+@import assets-management.md
 @import native-code.md
 @import build-system.md
+@import misc.md

+ 108 - 0
modules/monkey/docs/language/loop-statements.md

@@ -0,0 +1,108 @@
+### Loop statements
+#### While
+
+The `While` loop allows you to execute a block of statements repeatedly while a boolean expression evaluates to true.
+
+Note that a `While` loop may never actually execute any of it's statements if the expression evaluates to false when the loop is entered.
+
+The syntax for the `While` loop is:
+
+`While` _Expression_
+
+     _Statements..._
+
+`Wend`
+
+`End` or `End While` may be used instead of `Wend`.
+
+`Exit` and `Continue` may be used within a While loop to abruptly terminate or continue loop execution.
+
+#### Repeat
+
+Like the `While` loop, the `Repeat` loop also allows you to execute a block of statement repeatedly while a boolean expression evaluates to true.
+
+However, unlike a `While` loop, a `Repeat` loop is guaranteed to execute at least once, as the boolean expression is not evaluated until the end of the loop.
+
+The syntax for `Repeat`/`Until` loops is:
+
+`Repeat`
+
+     _Statements..._
+
+`Until` _Expression_
+
+..or..
+
+`Repeat`
+
+     _Statements..._
+
+`Forever`
+
+`Exit` and `Continue` may be used within a Repeat loop to abruptly terminate or continue loop execution.
+
+#### For (Numeric)
+
+A numeric `For` loop will continue executing until the value of a numeric index variable reaches an exit value.
+
+The index variable is automatically updated every loop iteration by adding a constant step value.
+
+The syntax for a numeric `For` loop is:
+
+
+`For` [ `Local` ] _IndexVariable_ [:]= _FirstValue_ `To` | `Until` _LastValue_ [ `Step` _StepValue_ ]
+
+     _Statements..._
+
+`Next`
+
+
+`End` or `End For` may be used instead of `Next`.
+
+If present, `Local` will create a new local index variable that only exists for the duration of the loop. In addition, IndexVariable must include the variable type, or `:=` must be used instead of `=` to implicitly set the variable's type.
+
+If `Local` is not present, IndexVariable must be a valid, existing variable.
+
+The use of `To` or `Until` determines whether LastValue should be inclusive or exclusive.
+
+If `To` is used, the loop will exit once the index variable is greater than LastValue (or less than if StepValue is negative).
+
+If `Until` is used, the loop will exit once the index variable is greater than or equal to LastValue (or less than or equal to if StepValue is negative).
+
+If omitted, StepValue defaults to 1.
+
+`Exit` and `Continue` may be used within a numeric For loop to abruptly terminate or continue loop execution.
+
+#### For (EachIn)
+
+A `For` `EachIn` loop allows you to iterate through the elements of a collection.
+
+A collection is either an array, a string, or a specially designed object.
+
+The syntax for a `For` `EachIn` loop is:
+
+`For` [ `Local` ] _IndexVariable_ [:]= `EachIn` _Collection_
+
+     _Statements..._
+
+`Next`
+
+`End` or `End For` may be used instead of `Next`.
+
+If present, `Local` will create a new local index variable that only exists for the duration of the loop. In addition, IndexVariable must include the variable type, or `:=` must be used instead of `=` to implicitly set the variable's type.
+
+If `Local` is not present, IndexVariable must be a valid, existing variable.
+
+If Collection is an array, the loop will iterate through each element of the array, and the type of the index variable must match the element type of the array.
+
+If Collection is a string, the loop will iterate through each character code of the string, and the type of the index variable must be numeric.
+
+If Collection is an object, it must implement the std.collections.Icontainer interface. See <a href=http://monkeycoder.co.nz/mx2-docs/std-std-collections-icontainer/ target=blank>std-std-collections-icontainer</a>.
+
+#### Exit
+
+`Exit` can be used within `While`, `Repeat` and `For` loops to abruptly exit the loop before the loop termination condition has been met.
+
+#### Continue
+
+Continue can be used within `While`, `Repeat` and `For` loops to force the loop to abruptly skip to the next loop iteration, skipping over any statements that may be remaining in the current loop iteration.

+ 39 - 0
modules/monkey/docs/language/misc.md

@@ -0,0 +1,39 @@
+### Miscellaneous
+
+#### Inline Code comments
+
+Inline comments can be done with the `'` character.
+```
+Print "hello!" 'this line prints hello! on the output console
+```
+
+#### Line breaks in code
+
+Lines can currently only be split after ‘[‘, ‘(‘ or ‘,’ tokens.
+
+```
+Local myArray:Int[] = New Int[](
+    0,
+    1,
+    2)
+
+Local myarray2:String[,] = New String[
+    10,
+    10]
+```
+
+#### Print
+
+Writes a String or a numeric value to the output console.
+
+```
+Print "Hello world" 'printing a String
+Print myFloat 'printing a Float
+```
+
+#### $ Hexadecimal
+
+Hexadecimal numbers can be entered using the $ symbol
+```
+Local i:=$A0F
+```

+ 87 - 0
modules/monkey/docs/language/pointers.md

@@ -0,0 +1,87 @@
+
+### Pointers
+
+Pointers are special variables containing a memory address.
+In Monkey2 pointers are mainly used with external C/C++ code.
+Try not to use pointers unless absolutely necessary. It can lead to bugs if the pointed address is not kept "alive". Pointers to globals are safe, for example.  
+You must have access to the memory you're trying to reach or you'll have a (fatal) memory access violation.
+
+A pointer can point to any kind of type, even garbage collected types. This can lead to bad things too as the garbage collector is not 'aware' of pointers.
+
+#### Declaration
+
+Use the `Ptr` keyword to declare a pointer.
+
+
+```
+Local myPtr:int Ptr
+
+Local anotherPtr:Void Ptr
+```
+
+#### Referencing
+
+Use the `VarPtr` operator to reference a pointer
+
+```
+Local i:int=1
+Local myPtr:int Ptr
+
+myPtr=VarPtr i
+```
+The myPtr pointer now points to the variable i
+
+#### Dereferencing with []
+
+You can access the pointed value(s) with the `[]` index operator
+
+```
+Local i:int=1
+Local myPtr:int Ptr
+
+myPtr=VarPtr i
+Print myPtr[0]
+```
+Will print 1, the value of `i`.
+Note you can use pointer arythmetics with the index operator(`[]`) but you have to be sure you have access to that part of the memory or you'll get a memory access violation!
+
+#### Dereferencing with ->
+
+You can access user defined types fields, methods,.. with the `->` operator. It is equivalent to `[0].`
+
+```
+Struct str
+	Field i:Int=1
+End
+
+Function Main()
+   Local s:=New str
+   Local strPtr:str Ptr
+   strPtr=VarPtr s
+
+   Print strPtr->i
+End
+```
+will show the value of the struct's field `i`
+
+#### Casting
+
+You can Cast a pointer and do some explicit conversions with the `Cast` operator.
+
+`Cast`<_Type_>(_address_)
+
+An example with a useless conversion from Int to Void to Int:
+```
+Local i:int=1
+Local myVoidPtr:Void Ptr
+
+myVoidPtr=Cast<Void Ptr>(VarPtr i)
+
+Local j:int
+Local myIntPtr:Int Ptr
+
+myIntPtr=Cast<Int Ptr>(myVoidPtr)
+j=myIntPtr[0]
+```
+`j` receives the value of `i` but does not have the same address.
+`myIntPtr` and `myVoidPtr` both point to the same address (`VarPtr i`) but have different types.

+ 10 - 9
modules/monkey/docs/language/preprocessor.md

@@ -1,7 +1,7 @@
 
 ### Preprocessor
 
-Monkey2 include a simple preprocessor that allows you to conditionally compile code depending on a number of build setttings.
+Monkey2 includes a simple preprocessor that allows you to conditionally compile code depending on a number of build setttings.
 
 The preprocessor supports the following statements: #If, #Else, #ElseIf, #EndIf, #Rem, #End. Preprocessor statements must begin on a new line.
 
@@ -10,14 +10,14 @@ Preprocessor expressions may only use the 'And', 'Or' and comparison operators.
 The following symbols may be used in preprocessor expressions:
 
 | Symbol			| Type		| Meaning
-|:------------------|:----------|--------
-|__TARGET__			| String	| The current build target. One of: "windows", "macos", "linux", "android", "ios", "emscripten"
-|__CONFIG__			| String	| The current build config. One of: "release", "debug"
-|__DESKTOP_TARGET__	| Bool		| True if the current build target is windows, macos or linux.
-|__MOBILE_TARGET__	| Bool		| True if the current build target is android or ios.
-|__WEB_TARGET__		| Bool		| True if the current build target is emscripten.
-|__DEBUG__			| Bool		| True if the current build config is debug.
-|__RELEASE__		| Bool		| True if the current build config is release.
+|:----------------------|:------|:--------------------------------------------:
+| \_\_TARGET\_\_			| String	| The current build target. One of: "windows", "macos", "linux", "android", "ios", "emscripten"
+| \_\_CONFIG\_\_			| String	| The current build config. One of: "release", "debug"
+| \_\_DESKTOP\_TARGET\_\_	| Bool		| True if the current build target is windows, macos or linux.
+| \_\_MOBILE\_TARGET\_\_	| Bool		| True if the current build target is android or ios.
+| \_\_WEB\_TARGET\_\_		| Bool		| True if the current build target is emscripten.
+| \_\_DEBUG\_\_			| Bool		| True if the current build config is debug.
+| \_\_RELEASE\_\_		| Bool		| True if the current build config is release.
 
 For example, to include code in debug builds only, use something like:
 
@@ -33,3 +33,4 @@ To include code on desktop or mobile builds, use:
 #If __DESKTOP_TARGET__ Or __MOBILE_TARGET__
 Print "This code is only include in desktop and mobile builds."
 #Endif
+```

+ 10 - 4
modules/monkey/docs/language/reflection.md

@@ -1,6 +1,12 @@
 
 ### Reflection
 
+To use reflection in your code, you first need to import the reflection module.
+
+```
+#Import "<reflection>"
+```
+
 #### Typeof and TypeInfo
 
 The Typeof operator return a TypeInfo object, that contains various properties and methods for inspecting types at runtime. There are 2 ways to use Typeof:
@@ -108,11 +114,11 @@ Global MyGlobal:Int
 Function Main()
 
 	Local vdecl:=TypeInfo.GetType( "mynamespace" ).GetDecl( "MyGlobal" )
-	
+
 	vdecl.Set( Null,10 )
-	
+
 	Print MyGlobal
-	
+
 	Print Cast<Int>( vdecl.Get( Null ) )
 End
 ```
@@ -139,7 +145,7 @@ End
 Function Main()
 
 	Local fdecl:=TypeInfo.GetType( "mynamespace" ).GetDecl( "Test" )
-	
+
 	fdecl.Invoke( Null,New Variant[]( "Hello Test!" ) )
 End
 ```

+ 0 - 1
modules/monkey/docs/language/types.md

@@ -21,7 +21,6 @@ The following primtive types are supported by monkey2:
 | `Double`	| 64 bit floating point.
 | `String`	| String of 16 bit characters.
 
-
 #### Compound types
 
 The following compound types are supported by monkey2:

+ 84 - 10
modules/monkey/docs/language/user-types.md

@@ -14,9 +14,9 @@ The syntax for declaring a class is:
 </div>
 
 _SuperClass_ defaults to `Object` if omitted.
- 
+
 _Interfaces_ is a comma separated list of interface types.
- 
+
 _Modifier_ can be one of:
 
 * `Abstract` - class cannot be instantiated with 'New', it must be extended.
@@ -62,7 +62,7 @@ To declare an interface:
 `End`
 </div>
 
-_Interfaces_ is a comma separated list of interface types. 
+_Interfaces_ is a comma separated list of interface types.
 
 An interface can contain consts, globals, fields, methods, functions and other user defined types.
 
@@ -141,8 +141,7 @@ To declare a write only property:
 
 #### Conversion Operators
 
-You can also add 'conversion operators' to classes and structs. These allow you to convert from a custom class or struct type to an
-unrelated type, such as another class or struct type, or a primitive type such as String.
+You can also add 'conversion operators' to classes and structs. These allow you to convert from a custom class or struct type to an unrelated type, such as another class or struct type, or a primitive type such as String.
 
 The syntax for declaring a conversion operator is:
 
@@ -154,13 +153,24 @@ The syntax for declaring a conversion operator is:
 
 Conversion operators cannot be used to convert a class type to a base class type, or from any type to bool.
 
-For example, we can add a string conversion operator to the above Vec2 class like this:
+For example, we can add a string conversion operator to a class like this:
 
 ```
 Struct Vec2
 
-	...as above...
-	
+	Field x:Float
+	Field y:Float
+
+	Method New( x:Float,y:Float )
+		Self.x=x
+		Self.y=y
+	End
+
+	Method ToString:String()
+		Return "Vec2("+x+","+y+")"
+	End
+
+	' The string conversion operator
 	Operator To:String()
 		Return "Vec2("+x+","+y+")"
 	End
@@ -175,5 +185,69 @@ Local v:=New Vec2
 Print v
 ```
 
-We no longer need to use '.ToString()' when printing the string. Since Print() takes a string argument, and Vec2 has
-a conversion operator that returns a string, the conversion  operator is automatically called for you.
+We no longer need to use '.ToString()' when printing the string. Since Print() takes a string argument, and Vec2 has a conversion operator that returns a string, the conversion operator is automatically called for you.
+
+#### Extensions
+
+Extensions allow you to add extra methods and functions to existing classes or structs. Fields cannot be added this way. Private members cannot be accessed by extensions.
+```
+Struct Foo
+	Field i:Int=0
+End
+```
+```
+Struct Foo Extension
+	Method Increment()
+		i+=1
+	End
+End
+```
+
+#### Encapsulation
+
+There are three levels of encapsulation for class and struct members:
+
+-`Public` members can be accessed from anywhere. It is the default encapsulation level.
+
+-`Protected` members can only be accessed by the base class and the derived ones or by class/struct extensions. Code existing in the same source file have acces to `Protected` members too.
+
+-`Private` members can only be accessed by the base class. Code existing in the same source file have acces to `Private` members too.
+
+example:
+```
+Class Foo
+	'public by default'
+	Field i:Int
+
+	Protected
+
+	Field someProtectedThing:Int
+	Method doSomething()
+		Print "Doing something"
+	End
+
+	Private
+
+	Field _somePrivateThing:String
+End
+```
+
+#### Alias
+
+An `Alias` allows you to create a synonym for a previously declared type.
+
+<div class=syntax>
+`Alias` _Identifier_ `:` _Type_
+</div>
+
+<br>
+You can use your newly declared `Alias` instead of the original type anywhere in your code. For example:
+
+
+```
+Alias FantasticNumber:Int
+Alias FantasticString:String
+
+Local myInt:FantasticNumber = 123
+Local myString:FantasticString = "abc"
+```

+ 1 - 0
modules/monkey/docs/language/variables.md

@@ -43,3 +43,4 @@ Consts are stored in the same way as globals, but cannot be modified after they
 <div class=syntax>
 `Const` _Identifier_ `:=` _Expression_
 </div>
+

+ 1 - 0
modules/monkey/docs/manual.md

@@ -19,3 +19,4 @@ Have fun!
 
 @import mx2cc.md
 
+@import index/index.md

+ 1 - 1
modules/monkey/docs/mx2cc.md

@@ -23,6 +23,6 @@ Valid options are:
 
 * `clean` - rebuilds everything from scratch.
 * `verbose` - provides more information while building.
-* `target=`_target_ - set target to `desktop` (the default) or `emscripten`.
+* `target=`_target_ - set target to `desktop` (the default) or `windows`, `macos`, `linux`, `emscripten`, `wasm`, `android`, `ios`. `desktop` is an alias for current host.
 * `config=`_config_ - set config to `debug` (the default) or `release`.
 * `apptype=`_apptype_ set apptype to `gui` (the default) or `console`.