From e18d46c11f66df9615749a426e3b6c7be4f67e81 Mon Sep 17 00:00:00 2001 From: Preston Guillory Date: Wed, 23 Feb 2011 18:54:22 -0600 Subject: [PATCH] Moved registerExtension() into 'transform' module and renamed it 'cinch'. --- index.js | 4 +- lib/{transform.js => cinch.js} | 72 ++++++++++--------- lib/register.js | 16 ----- ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 ...dex.js.after.json => index.js.parsed.json} | 0 ...x.js.before.json => index.js_.parsed.json} | 0 73 files changed, 40 insertions(+), 52 deletions(-) rename lib/{transform.js => cinch.js} (95%) delete mode 100644 lib/register.js rename test/tests/1. Functions/1. Returning a value/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/1. Returning a value/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/2. Implicitly return undefined/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/2. Implicitly return undefined/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/3. Throws propagate/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/3. Throws propagate/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/4. Call a regular function/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/4. Call a regular function/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/4b. Call a transformed function/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/4b. Call a transformed function/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/5. Pass through async result/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/5. Pass through async result/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/7. Return expression containing transformed function call/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/7. Return expression containing transformed function call/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/1. Functions/9. Function defined in var/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/1. Functions/9. Function defined in var/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/1. In semicolon expression/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/1. In semicolon expression/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/2. In var initializer/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/2. In var initializer/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/3. In return value/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/3. In return value/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/4. In if expression/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/4. In if expression/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/5. In throw exception/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/5. In throw exception/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/2. Streamlined function call/6. In dot/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/2. Streamlined function call/6. In dot/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/3. While/1. Works/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/3. While/1. Works/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/3. While/2. Body/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/3. While/2. Body/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/3. While/3. Break/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/3. While/3. Break/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/3. While/4. Break in else/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/3. While/4. Break in else/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/3. While/5. Continue/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/3. While/5. Continue/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/4. For/1. Works/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/4. For/1. Works/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/4. For/2. Iterates properly/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/4. For/2. Iterates properly/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/4. For/3. Continue/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/4. For/3. Continue/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/5. Switch/1. SFC in discriminant/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/5. Switch/1. SFC in discriminant/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/5. Switch/2. SFC in case/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/5. Switch/2. SFC in case/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/6. Try-catch/8. In a try block/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/6. Try-catch/8. In a try block/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/6. Try-catch/8b. In a catch block/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/6. Try-catch/8b. In a catch block/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/6. Try-catch/8c. In a finally block/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/6. Try-catch/8c. In a finally block/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/7. For-in/1. Basic use/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/7. For-in/1. Basic use/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/7. For-in/2. SFC in object clause/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/7. For-in/2. SFC in object clause/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/8. If/1. thenPart is single return/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/8. If/1. thenPart is single return/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/8. If/1b. elsePart is single return/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/8. If/1b. elsePart is single return/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/9. Throws in expressions/1. Return value/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/9. Throws in expressions/1. Return value/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/9. Throws in expressions/2. Semicolon expression/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/9. Throws in expressions/2. Semicolon expression/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/9. Throws in expressions/3. Var initializer/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/9. Throws in expressions/3. Var initializer/{index.js.before.json => index.js_.parsed.json} (100%) rename test/tests/9. Throws in expressions/4. If condition/{index.js.after.json => index.js.parsed.json} (100%) rename test/tests/9. Throws in expressions/4. If condition/{index.js.before.json => index.js_.parsed.json} (100%) diff --git a/index.js b/index.js index 1a6a5ef..1cf6455 100644 --- a/index.js +++ b/index.js @@ -1,3 +1 @@ -exports.registerExtension = require('./lib/register').registerExtension; -exports.transformSource = require("./lib/transform").transformSource; -exports.transformFile = require("./lib/transform").transformFile; +module.exports = require('./lib/cinch.js') diff --git a/lib/transform.js b/lib/cinch.js similarity index 95% rename from lib/transform.js rename to lib/cinch.js index e8ed766..5c7783c 100644 --- a/lib/transform.js +++ b/lib/cinch.js @@ -13,57 +13,61 @@ var idents = require('./idents') var banner = "/*** Generated by Cinch ***/\n"; -exports.transformSource = function(source) { - idents.reset() - var script = Narcissus.parser.parse(source) - transform_script(script) - var transformed = pp(script) + '\n' - return transformed -} +exports.registerExtension = function(options) { + options = options || {} -exports.transformFile = function(filename_, options) { - var dirname = path.dirname(filename_) - var ext = path.extname(filename_) - var basename = path.basename(filename_, ext) - var filename = path.join(dirname, basename + '.js') + // force require() to check for .js_ before .js + var js_extension = require.extensions['.js'] + delete require.extensions['.js'] - idents.reset() + require.extensions[options.extension || '.js_'] = function(module, filename_) { + var dirname = path.dirname(filename_) + var ext = path.extname(filename_) + var basename = path.basename(filename_, ext) + var filename = path.join(dirname, basename + '.js') - var source = fs.readFileSync(filename_, 'utf8'); + var source = fs.readFileSync(filename_, 'utf8'); - if (options.saveParseTree) { try { - var script = Narcissus.parser.parse(source) + Narcissus.parser.parse(source) } catch (err) { module._compile(source, filename_) throw err } - strip(script) - fs.writeFileSync(filename + '.before.json', JSON.stringify(script), 'utf8') - } - try { + if (options.saveParseTree) { + var script = Narcissus.parser.parse(source) + strip(script) + fs.writeFileSync(filename_ + '.parsed.json', JSON.stringify(script), 'utf8') + + var script = Narcissus.parser.parse(source) + transform_script(script) + strip(script) + fs.writeFileSync(filename + '.parsed.json', JSON.stringify(script), 'utf8') + } + var script = Narcissus.parser.parse(source) - } catch (err) { - module._compile(source, filename_) - throw err - } - transform_script(script) - var transformed = pp(script) + '\n' + transform_script(script) + var transformed = pp(script) + '\n' + + if (options.saveSource) { + fs.writeFileSync(filename, transformed, 'utf8'); + } - if (options.saveParseTree) { - strip(script) - fs.writeFileSync(filename + '.after.json', JSON.stringify(script), 'utf8') + module._compile(transformed, filename) } - if (options.saveSource) { - fs.writeFileSync(filename, transformed, 'utf8'); - } + require.extensions['.js'] = js_extension +} - return transformed +exports.transformSource = function(source) { + var script = Narcissus.parser.parse(source) + transform_script(script) + return pp(script) + '\n' } function transform_script(script) { + idents.reset() scan_for_functions_to_transform(script).forEach(transform_function) replace_passthrough_callbacks(script) replace_passthrough_functions(script) @@ -153,10 +157,12 @@ function is_passthrough_function(n) { } function foo() { bar() + baz() } // ...to... { bar() + baz() } */ function inline_functions_only_called_once(script) { diff --git a/lib/register.js b/lib/register.js deleted file mode 100644 index 1747147..0000000 --- a/lib/register.js +++ /dev/null @@ -1,16 +0,0 @@ -var cinch = require('..') - -exports.registerExtension = function(options) { - options = options || {} - - // force require() to check for .js_ before .js - var js_extension = require.extensions['.js'] - delete require.extensions['.js'] - - require.extensions[options.extension || '.js_'] = function(module, filename) { - var content = cinch.transformFile(filename, options) - module._compile(content, filename) - } - - require.extensions['.js'] = js_extension -} diff --git a/test/tests/1. Functions/1. Returning a value/index.js.after.json b/test/tests/1. Functions/1. Returning a value/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/1. Returning a value/index.js.after.json rename to test/tests/1. Functions/1. Returning a value/index.js.parsed.json diff --git a/test/tests/1. Functions/1. Returning a value/index.js.before.json b/test/tests/1. Functions/1. Returning a value/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/1. Returning a value/index.js.before.json rename to test/tests/1. Functions/1. Returning a value/index.js_.parsed.json diff --git a/test/tests/1. Functions/2. Implicitly return undefined/index.js.after.json b/test/tests/1. Functions/2. Implicitly return undefined/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/2. Implicitly return undefined/index.js.after.json rename to test/tests/1. Functions/2. Implicitly return undefined/index.js.parsed.json diff --git a/test/tests/1. Functions/2. Implicitly return undefined/index.js.before.json b/test/tests/1. Functions/2. Implicitly return undefined/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/2. Implicitly return undefined/index.js.before.json rename to test/tests/1. Functions/2. Implicitly return undefined/index.js_.parsed.json diff --git a/test/tests/1. Functions/3. Throws propagate/index.js.after.json b/test/tests/1. Functions/3. Throws propagate/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/3. Throws propagate/index.js.after.json rename to test/tests/1. Functions/3. Throws propagate/index.js.parsed.json diff --git a/test/tests/1. Functions/3. Throws propagate/index.js.before.json b/test/tests/1. Functions/3. Throws propagate/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/3. Throws propagate/index.js.before.json rename to test/tests/1. Functions/3. Throws propagate/index.js_.parsed.json diff --git a/test/tests/1. Functions/4. Call a regular function/index.js.after.json b/test/tests/1. Functions/4. Call a regular function/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/4. Call a regular function/index.js.after.json rename to test/tests/1. Functions/4. Call a regular function/index.js.parsed.json diff --git a/test/tests/1. Functions/4. Call a regular function/index.js.before.json b/test/tests/1. Functions/4. Call a regular function/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/4. Call a regular function/index.js.before.json rename to test/tests/1. Functions/4. Call a regular function/index.js_.parsed.json diff --git a/test/tests/1. Functions/4b. Call a transformed function/index.js.after.json b/test/tests/1. Functions/4b. Call a transformed function/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/4b. Call a transformed function/index.js.after.json rename to test/tests/1. Functions/4b. Call a transformed function/index.js.parsed.json diff --git a/test/tests/1. Functions/4b. Call a transformed function/index.js.before.json b/test/tests/1. Functions/4b. Call a transformed function/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/4b. Call a transformed function/index.js.before.json rename to test/tests/1. Functions/4b. Call a transformed function/index.js_.parsed.json diff --git a/test/tests/1. Functions/5. Pass through async result/index.js.after.json b/test/tests/1. Functions/5. Pass through async result/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/5. Pass through async result/index.js.after.json rename to test/tests/1. Functions/5. Pass through async result/index.js.parsed.json diff --git a/test/tests/1. Functions/5. Pass through async result/index.js.before.json b/test/tests/1. Functions/5. Pass through async result/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/5. Pass through async result/index.js.before.json rename to test/tests/1. Functions/5. Pass through async result/index.js_.parsed.json diff --git a/test/tests/1. Functions/7. Return expression containing transformed function call/index.js.after.json b/test/tests/1. Functions/7. Return expression containing transformed function call/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/7. Return expression containing transformed function call/index.js.after.json rename to test/tests/1. Functions/7. Return expression containing transformed function call/index.js.parsed.json diff --git a/test/tests/1. Functions/7. Return expression containing transformed function call/index.js.before.json b/test/tests/1. Functions/7. Return expression containing transformed function call/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/7. Return expression containing transformed function call/index.js.before.json rename to test/tests/1. Functions/7. Return expression containing transformed function call/index.js_.parsed.json diff --git a/test/tests/1. Functions/9. Function defined in var/index.js.after.json b/test/tests/1. Functions/9. Function defined in var/index.js.parsed.json similarity index 100% rename from test/tests/1. Functions/9. Function defined in var/index.js.after.json rename to test/tests/1. Functions/9. Function defined in var/index.js.parsed.json diff --git a/test/tests/1. Functions/9. Function defined in var/index.js.before.json b/test/tests/1. Functions/9. Function defined in var/index.js_.parsed.json similarity index 100% rename from test/tests/1. Functions/9. Function defined in var/index.js.before.json rename to test/tests/1. Functions/9. Function defined in var/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/1. In semicolon expression/index.js.after.json b/test/tests/2. Streamlined function call/1. In semicolon expression/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/1. In semicolon expression/index.js.after.json rename to test/tests/2. Streamlined function call/1. In semicolon expression/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/1. In semicolon expression/index.js.before.json b/test/tests/2. Streamlined function call/1. In semicolon expression/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/1. In semicolon expression/index.js.before.json rename to test/tests/2. Streamlined function call/1. In semicolon expression/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/2. In var initializer/index.js.after.json b/test/tests/2. Streamlined function call/2. In var initializer/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/2. In var initializer/index.js.after.json rename to test/tests/2. Streamlined function call/2. In var initializer/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/2. In var initializer/index.js.before.json b/test/tests/2. Streamlined function call/2. In var initializer/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/2. In var initializer/index.js.before.json rename to test/tests/2. Streamlined function call/2. In var initializer/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/3. In return value/index.js.after.json b/test/tests/2. Streamlined function call/3. In return value/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/3. In return value/index.js.after.json rename to test/tests/2. Streamlined function call/3. In return value/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/3. In return value/index.js.before.json b/test/tests/2. Streamlined function call/3. In return value/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/3. In return value/index.js.before.json rename to test/tests/2. Streamlined function call/3. In return value/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/4. In if expression/index.js.after.json b/test/tests/2. Streamlined function call/4. In if expression/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/4. In if expression/index.js.after.json rename to test/tests/2. Streamlined function call/4. In if expression/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/4. In if expression/index.js.before.json b/test/tests/2. Streamlined function call/4. In if expression/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/4. In if expression/index.js.before.json rename to test/tests/2. Streamlined function call/4. In if expression/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/5. In throw exception/index.js.after.json b/test/tests/2. Streamlined function call/5. In throw exception/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/5. In throw exception/index.js.after.json rename to test/tests/2. Streamlined function call/5. In throw exception/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/5. In throw exception/index.js.before.json b/test/tests/2. Streamlined function call/5. In throw exception/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/5. In throw exception/index.js.before.json rename to test/tests/2. Streamlined function call/5. In throw exception/index.js_.parsed.json diff --git a/test/tests/2. Streamlined function call/6. In dot/index.js.after.json b/test/tests/2. Streamlined function call/6. In dot/index.js.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/6. In dot/index.js.after.json rename to test/tests/2. Streamlined function call/6. In dot/index.js.parsed.json diff --git a/test/tests/2. Streamlined function call/6. In dot/index.js.before.json b/test/tests/2. Streamlined function call/6. In dot/index.js_.parsed.json similarity index 100% rename from test/tests/2. Streamlined function call/6. In dot/index.js.before.json rename to test/tests/2. Streamlined function call/6. In dot/index.js_.parsed.json diff --git a/test/tests/3. While/1. Works/index.js.after.json b/test/tests/3. While/1. Works/index.js.parsed.json similarity index 100% rename from test/tests/3. While/1. Works/index.js.after.json rename to test/tests/3. While/1. Works/index.js.parsed.json diff --git a/test/tests/3. While/1. Works/index.js.before.json b/test/tests/3. While/1. Works/index.js_.parsed.json similarity index 100% rename from test/tests/3. While/1. Works/index.js.before.json rename to test/tests/3. While/1. Works/index.js_.parsed.json diff --git a/test/tests/3. While/2. Body/index.js.after.json b/test/tests/3. While/2. Body/index.js.parsed.json similarity index 100% rename from test/tests/3. While/2. Body/index.js.after.json rename to test/tests/3. While/2. Body/index.js.parsed.json diff --git a/test/tests/3. While/2. Body/index.js.before.json b/test/tests/3. While/2. Body/index.js_.parsed.json similarity index 100% rename from test/tests/3. While/2. Body/index.js.before.json rename to test/tests/3. While/2. Body/index.js_.parsed.json diff --git a/test/tests/3. While/3. Break/index.js.after.json b/test/tests/3. While/3. Break/index.js.parsed.json similarity index 100% rename from test/tests/3. While/3. Break/index.js.after.json rename to test/tests/3. While/3. Break/index.js.parsed.json diff --git a/test/tests/3. While/3. Break/index.js.before.json b/test/tests/3. While/3. Break/index.js_.parsed.json similarity index 100% rename from test/tests/3. While/3. Break/index.js.before.json rename to test/tests/3. While/3. Break/index.js_.parsed.json diff --git a/test/tests/3. While/4. Break in else/index.js.after.json b/test/tests/3. While/4. Break in else/index.js.parsed.json similarity index 100% rename from test/tests/3. While/4. Break in else/index.js.after.json rename to test/tests/3. While/4. Break in else/index.js.parsed.json diff --git a/test/tests/3. While/4. Break in else/index.js.before.json b/test/tests/3. While/4. Break in else/index.js_.parsed.json similarity index 100% rename from test/tests/3. While/4. Break in else/index.js.before.json rename to test/tests/3. While/4. Break in else/index.js_.parsed.json diff --git a/test/tests/3. While/5. Continue/index.js.after.json b/test/tests/3. While/5. Continue/index.js.parsed.json similarity index 100% rename from test/tests/3. While/5. Continue/index.js.after.json rename to test/tests/3. While/5. Continue/index.js.parsed.json diff --git a/test/tests/3. While/5. Continue/index.js.before.json b/test/tests/3. While/5. Continue/index.js_.parsed.json similarity index 100% rename from test/tests/3. While/5. Continue/index.js.before.json rename to test/tests/3. While/5. Continue/index.js_.parsed.json diff --git a/test/tests/4. For/1. Works/index.js.after.json b/test/tests/4. For/1. Works/index.js.parsed.json similarity index 100% rename from test/tests/4. For/1. Works/index.js.after.json rename to test/tests/4. For/1. Works/index.js.parsed.json diff --git a/test/tests/4. For/1. Works/index.js.before.json b/test/tests/4. For/1. Works/index.js_.parsed.json similarity index 100% rename from test/tests/4. For/1. Works/index.js.before.json rename to test/tests/4. For/1. Works/index.js_.parsed.json diff --git a/test/tests/4. For/2. Iterates properly/index.js.after.json b/test/tests/4. For/2. Iterates properly/index.js.parsed.json similarity index 100% rename from test/tests/4. For/2. Iterates properly/index.js.after.json rename to test/tests/4. For/2. Iterates properly/index.js.parsed.json diff --git a/test/tests/4. For/2. Iterates properly/index.js.before.json b/test/tests/4. For/2. Iterates properly/index.js_.parsed.json similarity index 100% rename from test/tests/4. For/2. Iterates properly/index.js.before.json rename to test/tests/4. For/2. Iterates properly/index.js_.parsed.json diff --git a/test/tests/4. For/3. Continue/index.js.after.json b/test/tests/4. For/3. Continue/index.js.parsed.json similarity index 100% rename from test/tests/4. For/3. Continue/index.js.after.json rename to test/tests/4. For/3. Continue/index.js.parsed.json diff --git a/test/tests/4. For/3. Continue/index.js.before.json b/test/tests/4. For/3. Continue/index.js_.parsed.json similarity index 100% rename from test/tests/4. For/3. Continue/index.js.before.json rename to test/tests/4. For/3. Continue/index.js_.parsed.json diff --git a/test/tests/5. Switch/1. SFC in discriminant/index.js.after.json b/test/tests/5. Switch/1. SFC in discriminant/index.js.parsed.json similarity index 100% rename from test/tests/5. Switch/1. SFC in discriminant/index.js.after.json rename to test/tests/5. Switch/1. SFC in discriminant/index.js.parsed.json diff --git a/test/tests/5. Switch/1. SFC in discriminant/index.js.before.json b/test/tests/5. Switch/1. SFC in discriminant/index.js_.parsed.json similarity index 100% rename from test/tests/5. Switch/1. SFC in discriminant/index.js.before.json rename to test/tests/5. Switch/1. SFC in discriminant/index.js_.parsed.json diff --git a/test/tests/5. Switch/2. SFC in case/index.js.after.json b/test/tests/5. Switch/2. SFC in case/index.js.parsed.json similarity index 100% rename from test/tests/5. Switch/2. SFC in case/index.js.after.json rename to test/tests/5. Switch/2. SFC in case/index.js.parsed.json diff --git a/test/tests/5. Switch/2. SFC in case/index.js.before.json b/test/tests/5. Switch/2. SFC in case/index.js_.parsed.json similarity index 100% rename from test/tests/5. Switch/2. SFC in case/index.js.before.json rename to test/tests/5. Switch/2. SFC in case/index.js_.parsed.json diff --git a/test/tests/6. Try-catch/8. In a try block/index.js.after.json b/test/tests/6. Try-catch/8. In a try block/index.js.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8. In a try block/index.js.after.json rename to test/tests/6. Try-catch/8. In a try block/index.js.parsed.json diff --git a/test/tests/6. Try-catch/8. In a try block/index.js.before.json b/test/tests/6. Try-catch/8. In a try block/index.js_.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8. In a try block/index.js.before.json rename to test/tests/6. Try-catch/8. In a try block/index.js_.parsed.json diff --git a/test/tests/6. Try-catch/8b. In a catch block/index.js.after.json b/test/tests/6. Try-catch/8b. In a catch block/index.js.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8b. In a catch block/index.js.after.json rename to test/tests/6. Try-catch/8b. In a catch block/index.js.parsed.json diff --git a/test/tests/6. Try-catch/8b. In a catch block/index.js.before.json b/test/tests/6. Try-catch/8b. In a catch block/index.js_.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8b. In a catch block/index.js.before.json rename to test/tests/6. Try-catch/8b. In a catch block/index.js_.parsed.json diff --git a/test/tests/6. Try-catch/8c. In a finally block/index.js.after.json b/test/tests/6. Try-catch/8c. In a finally block/index.js.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8c. In a finally block/index.js.after.json rename to test/tests/6. Try-catch/8c. In a finally block/index.js.parsed.json diff --git a/test/tests/6. Try-catch/8c. In a finally block/index.js.before.json b/test/tests/6. Try-catch/8c. In a finally block/index.js_.parsed.json similarity index 100% rename from test/tests/6. Try-catch/8c. In a finally block/index.js.before.json rename to test/tests/6. Try-catch/8c. In a finally block/index.js_.parsed.json diff --git a/test/tests/7. For-in/1. Basic use/index.js.after.json b/test/tests/7. For-in/1. Basic use/index.js.parsed.json similarity index 100% rename from test/tests/7. For-in/1. Basic use/index.js.after.json rename to test/tests/7. For-in/1. Basic use/index.js.parsed.json diff --git a/test/tests/7. For-in/1. Basic use/index.js.before.json b/test/tests/7. For-in/1. Basic use/index.js_.parsed.json similarity index 100% rename from test/tests/7. For-in/1. Basic use/index.js.before.json rename to test/tests/7. For-in/1. Basic use/index.js_.parsed.json diff --git a/test/tests/7. For-in/2. SFC in object clause/index.js.after.json b/test/tests/7. For-in/2. SFC in object clause/index.js.parsed.json similarity index 100% rename from test/tests/7. For-in/2. SFC in object clause/index.js.after.json rename to test/tests/7. For-in/2. SFC in object clause/index.js.parsed.json diff --git a/test/tests/7. For-in/2. SFC in object clause/index.js.before.json b/test/tests/7. For-in/2. SFC in object clause/index.js_.parsed.json similarity index 100% rename from test/tests/7. For-in/2. SFC in object clause/index.js.before.json rename to test/tests/7. For-in/2. SFC in object clause/index.js_.parsed.json diff --git a/test/tests/8. If/1. thenPart is single return/index.js.after.json b/test/tests/8. If/1. thenPart is single return/index.js.parsed.json similarity index 100% rename from test/tests/8. If/1. thenPart is single return/index.js.after.json rename to test/tests/8. If/1. thenPart is single return/index.js.parsed.json diff --git a/test/tests/8. If/1. thenPart is single return/index.js.before.json b/test/tests/8. If/1. thenPart is single return/index.js_.parsed.json similarity index 100% rename from test/tests/8. If/1. thenPart is single return/index.js.before.json rename to test/tests/8. If/1. thenPart is single return/index.js_.parsed.json diff --git a/test/tests/8. If/1b. elsePart is single return/index.js.after.json b/test/tests/8. If/1b. elsePart is single return/index.js.parsed.json similarity index 100% rename from test/tests/8. If/1b. elsePart is single return/index.js.after.json rename to test/tests/8. If/1b. elsePart is single return/index.js.parsed.json diff --git a/test/tests/8. If/1b. elsePart is single return/index.js.before.json b/test/tests/8. If/1b. elsePart is single return/index.js_.parsed.json similarity index 100% rename from test/tests/8. If/1b. elsePart is single return/index.js.before.json rename to test/tests/8. If/1b. elsePart is single return/index.js_.parsed.json diff --git a/test/tests/9. Throws in expressions/1. Return value/index.js.after.json b/test/tests/9. Throws in expressions/1. Return value/index.js.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/1. Return value/index.js.after.json rename to test/tests/9. Throws in expressions/1. Return value/index.js.parsed.json diff --git a/test/tests/9. Throws in expressions/1. Return value/index.js.before.json b/test/tests/9. Throws in expressions/1. Return value/index.js_.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/1. Return value/index.js.before.json rename to test/tests/9. Throws in expressions/1. Return value/index.js_.parsed.json diff --git a/test/tests/9. Throws in expressions/2. Semicolon expression/index.js.after.json b/test/tests/9. Throws in expressions/2. Semicolon expression/index.js.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/2. Semicolon expression/index.js.after.json rename to test/tests/9. Throws in expressions/2. Semicolon expression/index.js.parsed.json diff --git a/test/tests/9. Throws in expressions/2. Semicolon expression/index.js.before.json b/test/tests/9. Throws in expressions/2. Semicolon expression/index.js_.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/2. Semicolon expression/index.js.before.json rename to test/tests/9. Throws in expressions/2. Semicolon expression/index.js_.parsed.json diff --git a/test/tests/9. Throws in expressions/3. Var initializer/index.js.after.json b/test/tests/9. Throws in expressions/3. Var initializer/index.js.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/3. Var initializer/index.js.after.json rename to test/tests/9. Throws in expressions/3. Var initializer/index.js.parsed.json diff --git a/test/tests/9. Throws in expressions/3. Var initializer/index.js.before.json b/test/tests/9. Throws in expressions/3. Var initializer/index.js_.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/3. Var initializer/index.js.before.json rename to test/tests/9. Throws in expressions/3. Var initializer/index.js_.parsed.json diff --git a/test/tests/9. Throws in expressions/4. If condition/index.js.after.json b/test/tests/9. Throws in expressions/4. If condition/index.js.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/4. If condition/index.js.after.json rename to test/tests/9. Throws in expressions/4. If condition/index.js.parsed.json diff --git a/test/tests/9. Throws in expressions/4. If condition/index.js.before.json b/test/tests/9. Throws in expressions/4. If condition/index.js_.parsed.json similarity index 100% rename from test/tests/9. Throws in expressions/4. If condition/index.js.before.json rename to test/tests/9. Throws in expressions/4. If condition/index.js_.parsed.json