introspection tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-08-04 04:09:22 +03:00
parent 0d1a788410
commit 7f68c713fb
2 changed files with 19 additions and 16 deletions

View File

@ -702,22 +702,23 @@ function Alias(alias, doc, ldoc, attrs, target){
doc = (!doc && parsed) ? parsed.doc : doc doc = (!doc && parsed) ? parsed.doc : doc
var meth = Action(alias, var func = function(){
doc, // parse the target...
null, // XXX should we cache here???
attrs, var action = parsed || this.parseStringAction(target)
function(){ var args = action.arguments.slice()
// parse the target...
// XXX should we cache here???
var action = parsed || this.parseStringAction(target)
var args = action.arguments.slice()
// XXX merge args... // XXX merge args...
// XXX // XXX
// call the alias... // call the alias...
return this[action.action].apply(this, args) return this[action.action].apply(this, args)
}) }
func.toString = function(){
return meth.alias.code || meth.alias }
// make the action...
var meth = Action(alias, doc, null, attrs, func)
meth.__proto__ = this.__proto__ meth.__proto__ = this.__proto__
meth.func.alias = target meth.func.alias = target
@ -1664,7 +1665,8 @@ module.MetaActions = {
+ (cur.pre.source_tag ? + (cur.pre.source_tag ?
normalizeTabs('// Source tag: ' + cur.pre.source_tag) + p : '') normalizeTabs('// Source tag: ' + cur.pre.source_tag) + p : '')
// code... // code...
//+ normalizeTabs(cur.pre.toString()).replace(/\n/g, p) + normalizeTabs(cur.pre.toString()).replace(/\n/g, p)
/*
+ normalizeTabs( + normalizeTabs(
!cur.pre.alias ? !cur.pre.alias ?
cur.pre.toString() cur.pre.toString()
@ -1672,6 +1674,7 @@ module.MetaActions = {
cur.pre.alias cur.pre.alias
: cur.pre.alias.code : cur.pre.alias.code
).replace(/\n/g, p) ).replace(/\n/g, p)
*/
+ p + p
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-actions", "name": "ig-actions",
"version": "3.5.0", "version": "3.5.1",
"description": "", "description": "",
"main": "actions.js", "main": "actions.js",
"scripts": { "scripts": {