Commit Graph

17 Commits

Author SHA1 Message Date
paulc 80bc17ebe7 Added support for non-JS NamedList in JsObject that is overriden in JsMessage.
Separate method is used to store the key names for iterating over unsafe lists.
Implemented handling of Yate messages and their parameters in module.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5135 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-19 18:55:45 +00:00
paulc a5a434f6cb Keep the prototype as an internal __proto__ property.
Exclude properties starting with two underlines from iterators.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5131 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 17:17:43 +00:00
paulc c446eb8d2e Changed the way native objects' constructors are called.
Added proper cleanup in module.
Added script unload hook onUnload() that just needs be defined.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5128 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 13:52:21 +00:00
paulc 0e96a42e96 Fixed handling of function arguments.
Added separate function for calling a script function.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5125 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-16 21:03:40 +00:00
paulc b9b8249d9a Always use the full setParam replacement when doing assignment in a script.
Fixes the impossibility to replace an object or function with a simple type.
NamedList::setParam(const char*,const char*) does not replace an existing parameter which may be a subclass of NamedString.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5119 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-15 10:40:06 +00:00
paulc 7b7b3abdf9 Added string properties and methods that apply to all non-JS objects.
Fixed the name resolution to allow the pseudo properties.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5081 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-30 17:48:13 +00:00
paulc 24670814da Implemented identity checking, proper null and undefined values.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5080 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-30 13:18:34 +00:00
paulc 64c9808103 Fixed object assignment to object fields.
Added dump_r and print_r methods of Engine to aid in debugging.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5078 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-30 08:32:47 +00:00
paulc 86384d16e5 Made JsRegExp object public, added constructor.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5075 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-28 16:10:41 +00:00
paulc eddb462738 Added code to parse inline [ arrays ] and { objects }.
Added separate methods to parse constants.
Made JsArray public because it's needed in many places.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5073 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-24 17:15:34 +00:00
paulc 97c2a7e6bb Moved helper functions to static methods of JsObject so code can be reused.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5063 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-15 14:43:15 +00:00
paulc 04e12d0985 Fixed prototypal inheritance and constructors.
Fixed Array length - it's a property not a method.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5059 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-14 19:51:36 +00:00
paulc ad0f68b964 Work in progress: added methods of Array class and const Object / Array parser.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5057 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-11 16:15:20 +00:00
paulc 1eec7eb43b Moved some Js objects implementation in another file.
Renamed Engine.Debug and Engine.Output to lower case to avoid confusion with constants.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5035 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-02 15:11:48 +00:00
paulc 49e1f5586d Moved declaration of some of the JS methods in the proper static initializer.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4954 acf43c95-373e-0410-b603-e72c3f656dc1
2012-03-05 09:53:31 +00:00
paulc a242f792c5 Updated scripting code.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4921 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-17 16:19:17 +00:00
paulc 5b773e7c5a Added partial universal scripting implementation with Javascript support.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4892 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-10 14:53:55 +00:00