Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

document keyword blocks

  • Loading branch information...
commit 4ad20fbfebc6b7d2cc87a4c05b86444615b20caf 1 parent 27a2165
@substack authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 readme.markdown
View
5 readme.markdown
@@ -63,7 +63,7 @@ function isKeyword (id) {
var output = falafel(src, { isKeyword: isKeyword }, function (node) {
if (node.type === 'UnaryExpression'
- && node.operator === 'beep') {
+ && node.keyword === 'beep') {
node.update(
'String(' + node.argument.source() + ').toUpperCase()'
);
@@ -122,6 +122,9 @@ function. When `opts.isKeyword(id)` returns `true`, the string `id` will be
treated as a keyword. You can use this behavior to create custom unary
expression keywords.
+An `opts.isKeyword(id)` value that is a string will be mapped to existing types.
+The only currently supported string value is `"block"`.
+
# nodes
Aside from the regular [esprima](http://esprima.org) data, you can also call
Please sign in to comment.
Something went wrong with that request. Please try again.