HaxeFoundation / intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
http://intellij-haxe.org
Apache License 2.0
220 stars 99 forks source link

Improved semantic annotator + expression evaluator #321

Open soywiz opened 9 years ago

soywiz commented 9 years ago

I have been working (and I'm still on it) improving the semantic annotator + the expression evaluator. That includes body annotations (from the expression evaluator).

I have continued the code from #320 so I will start a PR once that one is closed.

New branch is here: https://github.com/Akamon/intellij-haxe/tree/ImprovedSemantics

I will comment here the improvements.

soywiz commented 9 years ago

Create method is now working and induce types from parameters + return type from assignments, also create argument names based on used identifiers and types:

addmethod

soywiz commented 9 years ago

Switch is now implemented and check exhaustiveness (at least on some simple cases):

switch_exhaustiveness

soywiz commented 9 years ago

I have created:

HaxeProjectModel
HaxeModuleModel
HaxePackageModel
HaxeFileModel

Those models allow very easy package and class resolving. And provides a very convenient API for lot of stuff that previously was done calling lots of static methods in a monolithic way.

soywiz commented 9 years ago

break; and continue; outside loops:

break_not_inside_loop

soywiz commented 9 years ago

Implemented implement methods fix:

implement_methods

soywiz commented 9 years ago

Custom operators support:

custom_operators

soywiz commented 9 years ago

Report missing semicolon:

missing_semicolon

as3boyan commented 9 years ago

Man it is just awesome! Great work