Bump version 0.0.21
diff --git a/component.json b/component.json
new file mode 100644
index 0000000..bfd19a6
--- /dev/null
+++ b/component.json
@@ -0,0 +1,48 @@
+{
+    "name": "escodegen",
+    "description": "ECMAScript code generator",
+    "homepage": "http://github.com/Constellation/escodegen.html",
+    "main": "escodegen.js",
+    "bin": {
+        "esgenerate": "./bin/esgenerate.js",
+        "escodegen": "./bin/escodegen.js"
+    },
+    "version": "0.0.21",
+    "engines": {
+        "node": ">=0.4.0"
+    },
+    "maintainers": [
+        {
+            "name": "Yusuke Suzuki",
+            "email": "utatane.tea@gmail.com",
+            "web": "http://github.com/Constellation"
+        }
+    ],
+    "repository": {
+        "type": "git",
+        "url": "http://github.com/Constellation/escodegen.git"
+    },
+    "dependencies": {
+        "estraverse": "~0.0.4",
+        "esprima": "~1.0.2"
+    },
+    "optionalDependencies": {},
+    "devDependencies": {
+        "esprima-moz": "*",
+        "browserify": "*",
+        "q": "*",
+        "bower": "*",
+        "semver": "*"
+    },
+    "licenses": [
+        {
+            "type": "BSD",
+            "url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"
+        }
+    ],
+    "scripts": {
+        "test": "node test/run.js",
+        "release": "node tools/release.js",
+        "build": "(echo '// Generated by browserify'; ./node_modules/.bin/browserify -i source-map tools/entry-point.js) > escodegen.browser.js"
+    }
+}
\ No newline at end of file
diff --git a/escodegen.browser.js b/escodegen.browser.js
index 27313ec..c3a83f4 100644
--- a/escodegen.browser.js
+++ b/escodegen.browser.js
@@ -842,6 +842,67 @@
         return result;
     }
 
+    // Generate valid RegExp expression.
+    // This function is based on https://github.com/Constellation/iv Engine
+
+    function escapeRegExpCharacter(ch, previousIsBackslash) {
+        // not handling '\' and handling \u2028 or \u2029 to unicode escape sequence
+        if ((ch & ~1) === 0x2028) {
+            return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029');
+        } else if (ch === 10 || ch === 13) {  // \n, \r
+            return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r');
+        }
+        return String.fromCharCode(ch);
+    }
+
+    function generateRegExp(reg) {
+        var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
+
+        result = reg.toString();
+
+        if (reg.source) {
+            // extract flag from toString result
+            match = result.match(/\/([^/]*)$/);
+            if (!match) {
+                return result;
+            }
+
+            flags = match[1];
+            result = '';
+
+            characterInBrack = false;
+            previousIsBackslash = false;
+            for (i = 0, iz = reg.source.length; i < iz; ++i) {
+                ch = reg.source.charCodeAt(i);
+
+                if (!previousIsBackslash) {
+                    if (characterInBrack) {
+                        if (ch === 93) {  // ]
+                            characterInBrack = false;
+                        }
+                    } else {
+                        if (ch === 47) {  // /
+                            result += '\\';
+                        } else if (ch === 91) {  // [
+                            characterInBrack = true;
+                        }
+                    }
+                    result += escapeRegExpCharacter(ch, previousIsBackslash);
+                    previousIsBackslash = ch === 92;  // \
+                } else {
+                    // if new RegExp("\\\n') is provided, create /\n/
+                    result += escapeRegExpCharacter(ch, previousIsBackslash);
+                    // prevent like /\\[/]/
+                    previousIsBackslash = false;
+                }
+            }
+
+            return '/' + result + '/' + flags;
+        }
+
+        return result;
+    }
+
     function escapeAllowedCharacter(ch, next) {
         var code = ch.charCodeAt(0), hex = code.toString(16), result = '\\';
 
@@ -1747,7 +1808,12 @@
                 break;
             }
 
-            result = expr.value.toString();
+            if (typeof expr.value === 'boolean') {
+                result = expr.value ? 'true' : 'false';
+                break;
+            }
+
+            result = generateRegExp(expr.value);
             break;
 
         case Syntax.ComprehensionExpression:
diff --git a/package.json b/package.json
index 5756217..e7c9c7d 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
         "esgenerate": "./bin/esgenerate.js",
         "escodegen": "./bin/escodegen.js"
     },
-    "version": "0.0.21-dev",
+    "version": "0.0.21",
     "engines": {
         "node": ">=0.4.0"
     },
@@ -47,4 +47,4 @@
         "release": "node tools/release.js",
         "build": "(echo '// Generated by browserify'; ./node_modules/.bin/browserify -i source-map tools/entry-point.js) > escodegen.browser.js"
     }
-}
+}
\ No newline at end of file