# Copyright 2005 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.enable("easy-return") pragma.disable("explicit-result-guard") pragma.enable("importer") pragma.enable("exporter") def simpleRuneAuthor { to defaultAuths() { def privilegedScope := return [ "file__uriGetter" => privilegedScope["file__uriGetter"], "privilegedScope" => privilegedScope ] } to run(auths :Map) { def [=> , => privilegedScope] | _ := auths def simpleRune { to run(args :List) { # XXX def [scriptName] + scriptArgs := args def scope := privilegedScope.with("interp", def interp extends privilegedScope["interp"] { to getArgs() { return scriptArgs }}) return e__quasiParser([scriptName].getTwine()) <- eval(scope) } } return simpleRune } }