file_get_contents($case), 'error' => NULL, 'js' => NULL, 'rewrite' => ! (isset($_GET['rewrite']) && $_GET['rewrite'] === 'off'), 'tokens' => array() ); require '../src/CoffeeScript/Init.php'; CoffeeScript\Init::load(); $options = array( 'filename' => $case, 'header' => FALSE, 'rewrite' => $PHP['rewrite'], 'tokens' => & $PHP['tokens'], ); try { $PHP['js'] = CoffeeScript\Compiler::compile($PHP['coffee'], $options); } catch (Exception $e) { $PHP['error'] = $e->getMessage(); } if ($PHP['tokens']) { // Change the tokens to their canonical form so we can compare them against // those produced by the reference. $PHP['tokens'] = CoffeeScript\Lexer::t_canonical($PHP['tokens']); } } ?>
Lines in red are in the reference code, but are missing in ours. Lines in
green were generated in our code but are not present in the reference.
Failed.
Passed!
JS PHP
Tokens in red are in the reference stack, but are missing in ours. Tokens in
green were generated in our stack but are not present in the reference.
Failed.
Passed!
JS PHP
Pick a test case to run. Make sure that you're using a capable browser.