aboutsummaryrefslogtreecommitdiff
path: root/core.nom
diff options
context:
space:
mode:
Diffstat (limited to 'core.nom')
-rw-r--r--core.nom3
1 files changed, 3 insertions, 0 deletions
diff --git a/core.nom b/core.nom
index d152137..08115fa 100644
--- a/core.nom
+++ b/core.nom
@@ -204,6 +204,9 @@ rule "dict %items":
lua block "vars.dict[vars.pair[1]] = vars.pair[2]"
return %dict
+rule ["capitalize %str", "%str capitalized"]:
+ lua expr ".."|vars.str:gsub("%l", string.upper, 1)
+
rule "restrict %fn to within %whitelist":
lua block ".."
|local fns = compiler:get_invocations(vars.fn)