429c28d0cc
Rework error lovels for AerScript.
belliash2018-08-12 19:35:43 +02:00
029dd9bfb4
Several changes made: * Do not overload entry point * Automatically call Program::__construct() * Automatically call Program::main(); * Fix all tests
belliash2018-08-12 12:52:35 +02:00
c759b1f106
Improove error reporting for method declarations
belliash2018-08-12 09:23:21 +02:00
b61fc9d3e6
Rename function to save it from typo
belliash2018-08-11 23:21:40 +02:00
576edc6c20
Several changes to virtual class/method. Fixes#41 * do not automatically mark class as virtual when at least one virtual method found * force non-virtual method to contain body * force non-virtual class to implement all methods
belliash2018-08-11 22:50:05 +02:00
3252f54615
Temporarily look for modules in binary/ subdirectory. This will allow us to test modules. Final version should take the full path from configuration.
belliash2018-08-10 08:47:42 +02:00
8f7fc71027
Consider a method with compiled default value associated as a candidate to call. Fixes#37.
belliash2018-08-08 09:00:24 +02:00
e15166d940
Temporary fix for master branch
belliash2018-08-08 06:52:15 +02:00
bca4d1a2fa
Always select an appropriate function to call It does not matter, if we call function, anonymouss function or method. It is important to select appropriate function to call everytime. Otherwise, if function or method is not overloaded it will call it regardless the number and type of parameters it takes. type
belliash2018-08-07 19:48:12 +02:00
3a994221ce
Add another chapter to the readme
belliash2018-08-06 19:28:03 +02:00
4bbdc20174
This commit contains several changes: * print() is now treated as standard function * get rid of echo() function * fix test suite and it fixes#26.
belliash2018-08-06 17:18:27 +02:00
bcde1f446d
It does not matter if it is empty string or not, we want to process it. Empty string should not ever been even considered as a NULL. Fixing #35.
Piotr Likoski2018-08-06 16:13:49 +02:00
a8259e7dbc
Empty double-quoted string can be served as single-quoted string. Preparing for further changes in scope of #35.
Piotr Likoski2018-08-06 16:03:22 +02:00
dd239530d8
Test if unicode characters can be used as method / variable name
belliash2018-08-06 08:23:51 +02:00
ff6a7012a4
Another test, converting arab numbers to roman
belliash2018-08-05 22:25:15 +02:00
e300575ab1
P# does not support PHP tags, thus there is also no need to support shortcut for echo.
belliash2018-07-28 23:18:48 +02:00
5cb19f63a5
Get rid of alternative syntax for control structures (endif, endwhile, endfor, endforeach). Only curly brackets are allowed.
belliash2018-07-28 23:11:29 +02:00
8ab80ff8bc
Several fixes to multiple inheritance * Only first inherited class should be available via 'parent' keyword * If class X extends Y, Z and both Y and Z implements a(), $this->a() should match to the first one
belliash2018-07-28 11:53:56 +02:00
deabbd5554
Merge branch 'include_fix' into 'master'
belliash2018-07-28 10:17:18 +02:00
72f2cc2c1b
Remove useless fields, free some memory.
belliash2018-07-27 23:41:51 +02:00
bdf053a205
Implement a fix also for interface. This commit also adds initial and partial support for multiple inheritance.
belliash2018-07-27 23:28:34 +02:00
db93fd8b25
Make a use of our internal allocator instead of malloc()
belliash2018-07-27 21:16:50 +02:00
caf9126f0b
Several changes: * small code cleanup * implement new structure for storing information about class inheritance * implement PH7_NewClassInfo() * make a use of smaller ph7_class_info instead of ph7_class, to reduce memory usage
belliash2018-07-27 21:05:54 +02:00
33ab488ace
Removing a debug printf calls and improve error handling.
belliash2018-07-27 18:52:32 +02:00
9e885b3196
Generally speaking ... this is working. This commit partially fixes#5, however it still needs some work. TODO: * remove debugging printf calls, * some tuning, to consume less memory, * implement similar solution for interfaces
belliash2018-07-27 17:42:12 +02:00
af2c23d3b2
Add some basic checks. At this point, I can say it detects correctly a class declared inside inclueded file.
belliash2018-07-27 17:01:58 +02:00
b040886b97
Test and temporary version of compiler emiting PH7_OP_CLASS_INIT instruction. However it works on ph7_class and thus passes whole class into the VM, what causes memory overhead, as finally we have to find this class on the VM's stack. Instead, we could pass some ph7_class_info structure containing a name of class to look for and information about its inheritances.
belliash2018-07-27 08:24:53 +02:00
c24a9bc251
Our implementation of SyStrncpy()
belliash2018-07-27 08:22:55 +02:00
09451f4042
Two changes come here: * do not allow two or more classes / interfaces with the same name * fix class_exists() builtin function so that it does not return true if interface is found
belliash2018-07-25 19:00:49 +02:00
63b0f450d3
Move VM initialization into separate step to enable errors reporting earlier.
belliash2018-07-25 18:15:40 +02:00
7bf76c3fa0
Make reported errors more PHP-like
belliash2018-07-25 16:54:25 +02:00
eaf5ca7b5f
Make reported errors more PHP-like
belliash2018-07-25 16:54:25 +02:00
0c08bc61d4
Add some basic tests for the beginning
belliash2018-07-25 13:41:31 +02:00
6628a1ea3d
This is probably what we would like to skip during compilation.
belliash2018-07-25 13:34:17 +02:00