diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-08-10 16:52:03 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-08-14 03:26:26 -0500 |
commit | 1ba8c2cfa649300becae21876d3613362c219a37 (patch) | |
tree | 30ebb15e1bdd56927c09f9d74b573b019a260994 /builtin.c | |
parent | d654724fefab7a24ffa8e718f56028cff32971b9 (diff) |
Add `module` directive, `modulemeta` builtin
Fix #425.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include "compile.h" #include "jq_parser.h" #include "bytecode.h" +#include "linker.h" #include "locfile.h" #include "jv_unicode.h" @@ -812,6 +813,8 @@ static jv f_getpath(jq_state *jq, jv a, jv b) { return jv_getpath(a, b); } static jv f_delpaths(jq_state *jq, jv a, jv b) { return jv_delpaths(a, b); } static jv f_has(jq_state *jq, jv a, jv b) { return jv_has(a, b); } +static jv f_modulemeta(jq_state *jq, jv a) { return load_module_meta(jq, a); } + #define LIBM_DD(name) \ {(cfunction_ptr)f_ ## name, "_" #name, 1}, @@ -859,6 +862,7 @@ static const struct cfunction function_list[] = { {(cfunction_ptr)f_format, "format", 2}, {(cfunction_ptr)f_env, "env", 1}, {(cfunction_ptr)f_match, "_match_impl", 4}, + {(cfunction_ptr)f_modulemeta, "modulemeta", 1}, }; #undef LIBM_DD |