Bladeren bron

Merge pull request #60 from blitz-research/develop

Develop up
abakobo 8 jaren geleden
bovenliggende
commit
c1d28d059c

+ 2 - 2
bin/env_windows.txt

@@ -19,8 +19,8 @@ PATH=${MX2_HOME}\devtools\i686-6.2.0-posix-dwarf-rt_v5-rev1\mingw32\bin;${PATH}
 GCC_EXEC_PREFIX=
 
 'Linker options
-MX2_LD_OPTS_WINDOWS=-static -m32
-MX2_LD_OPTS_WINDOWS_DEBUG=-s
+MX2_LD_OPTS_WINDOWS=-s -static -m32
+MX2_LD_OPTS_WINDOWS_DEBUG=
 MX2_LD_OPTS_WINDOWS_RELEASE=
 
 'C Compiler options. Note: -D_WIN32_WINNT=0x0601 means headers for Windows 7, ie: Windows 7 is min SDK!

+ 3 - 3
modules/mojo/input/touch.monkey2

@@ -85,7 +85,7 @@ Class TouchDevice Extends InputDevice
 		
 			Local tevent:=Cast<SDL_TouchFingerEvent Ptr>( event )
 			
-			Print "SDL_FINGERDOWN, id="+tevent->fingerId
+'			Print "SDL_FINGERDOWN, id="+tevent->fingerId
 		
 			Local id:=-1
 			For Local i:=0 Until 10
@@ -105,7 +105,7 @@ Class TouchDevice Extends InputDevice
 
 			Local tevent:=Cast<SDL_TouchFingerEvent Ptr>( event )
 			
-			Print "SDL_FINGERUP, id="+tevent->fingerId
+'			Print "SDL_FINGERUP, id="+tevent->fingerId
 		
 			Local id:=-1
 			For Local i:=0 Until 10
@@ -124,7 +124,7 @@ Class TouchDevice Extends InputDevice
 
 			Local tevent:=Cast<SDL_TouchFingerEvent Ptr>( event )
 			
-			Print "SDL_FINGERMOTION, id="+tevent->fingerId
+'			Print "SDL_FINGERMOTION, id="+tevent->fingerId
 			
 			Local id:=-1
 			For Local i:=0 Until 10

+ 19 - 1
modules/monkey/docs/language/native-code.md

@@ -25,6 +25,25 @@ Global Counter:Int
 Function DoSomething( x:int,y:Int )
 ```
 
+You can declare the following inside extern blocks:
+
+* Consts
+
+* Globals
+
+* Structs
+
+* Classes
+
+* Functions
+
+
+You cannot declare the following inside extern blocks:
+
+* Generic functions or types
+
+* Operator methods
+
 
 #### Extern symbols
 
@@ -44,7 +63,6 @@ Class Actor="mylib::Actor"
 End
 ```
 
-
 #### Extern classes
 
 Extern classes are assumed by default to be *real* monkey2 classes - that is, they must extend the native bbObject class. 

+ 2 - 2
src/mx2cc/buildproduct.monkey2

@@ -403,11 +403,11 @@ Class GccBuildProduct Extends BuildProduct
 
 		Endif
 			
-		If opts.verbose>0 Print "Compiling "+src
+'		If opts.verbose>0 Print "Compiling "+src
 			
 		cmd+=(toolchain="msvc" ? " -Fo~q" Else " -o ~q") +obj+"~q ~q"+src+"~q"
 		
-		'If toolchain<>"msvc" Print StripDir( src )
+		If opts.verbose>0 And toolchain<>"msvc" Print StripDir( src )
 		
 		Exec( cmd )
 		

+ 24 - 2
src/ted2go/README.md

@@ -1,6 +1,8 @@
 # Ted2Go
 An IDE for Monkey2 programming language.
 
+Binaries for MacOS and Windows are available at [itch.io](https://nerobot.itch.io/ted2go).
+
 ## Benefits & Goals
 * Autocompletion for keywords, modules and user's code (WIP).
 * On-the-fly parser - see errors w/o build (not all errors).
@@ -10,7 +12,27 @@ An IDE for Monkey2 programming language.
 * Doc's hints directly inside of code area (todo).
 
 ## More info
-Discussion page: http://monkeycoder.co.nz/forums/topic/ted2go-fork/
+Discuss on [forum page](http://monkeycoder.co.nz/forums/topic/ted2go-fork/).
 
 ## Monkey <-> money :)
-Support me if you like this project: https://paypal.me/engor
+Support me if you like this project:
+* [PayPal](https://paypal.me/engor)
+* Payed downloading [from itch.io](https://nerobot.itch.io/ted2go)
+
+## Notes for contributors
+Please, take a look at code style. It based on original Ted2.
+
+Will be super-cool if you can write the same style to make this project consistent.
+
+`Local abc:="ABC"` ' there is no spaces in assignment
+
+`digit=8`
+
+`callSomeMethod( param1,param2 )` 'there are spaces in bracket bounds
+
+```
+Method check:Bool( value:Double ) 'spaces in declaration
+                          ' empty line after method name (can ignore if there is one-line body)
+   Return value > 1.75
+End
+```

+ 1 - 1
src/ted2go/parser/Monkey2Parser.monkey2

@@ -484,7 +484,7 @@ Class Monkey2Parser Extends CodeParserPlugin
 		
 		If isSelf Or isSuper
 		
-			item=scope.NearestClassScope
+			If scope Then item=scope.NearestClassScope
 			
 		Else ' not 'self' ident