From bb4be6bc6cede5798d1eea10548f6e377edcaeb6 Mon Sep 17 00:00:00 2001 From: Arinde Eniola Date: Thu, 8 Oct 2015 21:11:28 +0100 Subject: [PATCH 1/2] fix cake bake bug, existSync is depriciated --- Cakefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Cakefile b/Cakefile index d2e4cea..86f0426 100644 --- a/Cakefile +++ b/Cakefile @@ -56,13 +56,22 @@ compileCoffee = (filename) -> js_src = coffee.compile coffee_src fs.writeFileSync filename.replace(/\.coffee$/, '.js'), js_src +#function to check if the path exist +fileExists = (filePath)-> + try + fs.lstatSync filePath + true + catch err + if err.code is 'ENOENT' + false + # Creates any elements of the dirname of the given path that do not exist. ensurePathExists = (the_path) -> parts = the_path.split('/').slice 0, -1 current_path = '.' for part in parts current_path += '/' + part - fs.mkdirSync(current_path, 0o755) if not path.existsSync current_path + fs.mkdirSync(current_path, 0o755) if not fileExists current_path # Builds the interpreter engine including all dependencies for a given language. buildEngine = (name, lang, callback) -> From 8bbc54831a953e1c83cbe349a16a8bf694fb9e37 Mon Sep 17 00:00:00 2001 From: Arinde Eniola Date: Thu, 5 Nov 2015 00:00:23 +0100 Subject: [PATCH 2/2] remove some languages --- .gitmodules | 6 - extern/emoticoffee | 1 - extern/lol-coffee | 1 - languages.coffee | 272 --------------------------------------------- 4 files changed, 280 deletions(-) delete mode 160000 extern/emoticoffee delete mode 160000 extern/lol-coffee diff --git a/.gitmodules b/.gitmodules index 589550e..8b1c20f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,6 @@ [submodule "extern/bfjs"] path = extern/bfjs url = git://github.com/replit/bfjs.git -[submodule "extern/emoticoffee"] - path = extern/emoticoffee - url = git://github.com/replit/emoticoffee.git -[submodule "extern/lol-coffee"] - path = extern/lol-coffee - url = git://github.com/replit/lol-coffee.git [submodule "extern/unlambda-coffee"] path = extern/unlambda-coffee url = git://github.com/replit/unlambda-coffee.git diff --git a/extern/emoticoffee b/extern/emoticoffee deleted file mode 160000 index b69a119..0000000 --- a/extern/emoticoffee +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b69a1197362858016ae8e17709a4bc0e7a81897a diff --git a/extern/lol-coffee b/extern/lol-coffee deleted file mode 160000 index 5a89468..0000000 --- a/extern/lol-coffee +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5a894680e61615f53eb4262febf05e491976c2a7 diff --git a/languages.coffee b/languages.coffee index 0282f69..bee31c4 100644 --- a/languages.coffee +++ b/languages.coffee @@ -1,82 +1,3 @@ -@JSREPL::Languages::qbasic = - system_name: 'qbasic' - name: 'Quick Basic' - extension: 'bas' - matchings: [] - scripts: [ - 'extern/qb.js/Base.js' - 'extern/qb.js/Tokenizer.js' - 'extern/qb.js/Types.js' - 'extern/qb.js/EarleyParser.js' - 'extern/qb.js/RuleSet.js' - 'extern/qb.js/RuleParser.js' - 'extern/qb.js/TypeChecker.js' - 'extern/qb.js/CodeGenerator.js' - 'extern/qb.js/VirtualMachine.js' - 'extern/qb.js/QBasic.js' - ] - includes: [] - engine: 'langs/qbasic/jsrepl_qbasic.coffee' - minifier: 'closure' - -@JSREPL::Languages::scheme = - system_name: 'scheme' - name: 'Scheme' - extension: 'scm' - matchings: [ - ['(', ')'] - ['[', ']'] - ] - - scripts: [ - 'extern/biwascheme/src/version.js' - 'extern/biwascheme/src/deps/underscore.js' - 'extern/biwascheme/src/deps/underscore.string.js' - 'extern/biwascheme/src/header.js' - 'extern/biwascheme/src/system/class.js' - 'extern/biwascheme/src/system/_writer.js' - 'extern/biwascheme/src/system/_types.js' - 'extern/biwascheme/src/system/error.js' - 'extern/biwascheme/src/system/set.js' - 'extern/biwascheme/src/system/values.js' - 'extern/biwascheme/src/system/pair.js' - 'extern/biwascheme/src/system/symbol.js' - 'extern/biwascheme/src/system/char.js' - 'extern/biwascheme/src/system/number.js' - 'extern/biwascheme/src/system/port.js' - 'extern/biwascheme/src/system/record.js' - 'extern/biwascheme/src/system/enumeration.js' - 'extern/biwascheme/src/system/hashtable.js' - 'extern/biwascheme/src/system/syntax.js' - 'extern/biwascheme/src/system/parser.js' - 'extern/biwascheme/src/system/compiler.js' - 'extern/biwascheme/src/system/pause.js' - 'extern/biwascheme/src/system/call.js' - 'extern/biwascheme/src/system/interpreter.js' - 'extern/biwascheme/src/library/infra.js' - 'extern/biwascheme/src/library/r6rs_lib.js' - 'extern/biwascheme/src/library/js_interface.js' - 'extern/biwascheme/src/library/webscheme_lib.js' - 'extern/biwascheme/src/library/extra_lib.js' - 'extern/biwascheme/src/library/node_functions.js' - 'extern/biwascheme/src/library/srfi.js' - 'extern/biwascheme/src/platforms/browser/dumper.js' - 'extern/biwascheme/src/platforms/browser/console.js' - ] - includes: [] - engine: 'langs/scheme/jsrepl_scheme.coffee' - minifier: 'closure_es5' - -@JSREPL::Languages::apl = - system_name: 'apl' - name: 'APL' - extension: 'apl' - matchings: [['(', ')'], ['[', ']'], ['{', '}']] - scripts: ['extern/apl/lib/apl.js'] - includes: [] - engine: 'langs/apl/jsrepl_apl.coffee' - minifier: 'yui' - @JSREPL::Languages::javascript = system_name: 'javascript' name: 'JavaScript' @@ -110,183 +31,7 @@ engine: 'langs/coffee-script/jsrepl_coffee.coffee' minifier: 'uglify' -@JSREPL::Languages::brainfuck = - system_name: 'brainfuck' - name: 'Brainfuck' - extension: 'bf' - matchings: [ - ['[', ']'] - ] - scripts: [ - 'extern/bfjs/bfjs.js' - ] - includes: [] - engine: 'langs/brainfuck/jsrepl_brainfuck.coffee' - minifier: 'closure' - -@JSREPL::Languages::unlambda = - system_name: 'unlambda' - name: 'Unlambda' - extension: 'unl' - matchings: [] - scripts: [ - 'extern/unlambda-coffee/unlambda.coffee' - ] - includes: [] - engine: 'langs/unlambda/jsrepl_unlambda.coffee' - minifier: 'closure' - -@JSREPL::Languages::lolcode = - system_name: 'lolcode' - name: 'LOLCODE' - extension: 'lol' - matchings: [] - scripts: [ - 'extern/lol-coffee/src/base.coffee' - 'extern/lol-coffee/src/machine.coffee' - 'extern/lol-coffee/src/ast.coffee' - 'extern/lol-coffee/src/parser.coffee' - 'extern/lol-coffee/src/tokenizer.coffee' - ] - includes: [] - engine: 'langs/lolcode/jsrepl_lolcode.coffee' - minifier: 'closure' - -@JSREPL::Languages::kaffeine = - system_name: 'kaffeine' - name: 'Kaffeine' - extension: 'k' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'extern/kaffeine/kaffeine-browser.js' - 'util/console.js' - ] - includes: [] - engine: 'langs/kaffeine/jsrepl_kaffeine.coffee' - minifier: 'closure' -@JSREPL::Languages::move = - system_name: 'move' - name: 'Move' - extension: 'mv' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'extern/move/move.js' - 'util/console.js' - ] - includes: [] - engine: 'langs/move/jsrepl_move.coffee' - minifier: 'closure' - -@JSREPL::Languages::traceur = - system_name: 'traceur' - name: 'Traceur' - extension: 'js' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'util/console.js' - 'extern/traceur/traceur.js' - ] - includes: [] - engine: 'langs/traceur/jsrepl_traceur.coffee' - minifier: 'uglify' - -@JSREPL::Languages::emoticon = - system_name: 'emoticon' - name: 'Emoticon' - extension: 'emo' - matchings: [ - ['(', ')'] - ] - scripts: [ - 'extern/emoticoffee/emoticon.coffee' - ] - includes: [] - engine: 'langs/emoticon/jsrepl_emoticon.coffee' - minifier: 'closure' - -@JSREPL::Languages::bloop = - system_name: 'bloop' - name: 'Bloop/Floop' - extensions: 'bloop' - matchings: [] - scripts: [ - 'extern/bloop/bloop.js' - ] - includes: [] - engine: 'langs/bloop/jsrepl_bloop.coffee' - minifier: 'closure' - -@JSREPL::Languages::forth = - system_name: 'forth' - name: 'Forth' - extensions: '4th' - matchings: [ - ['(', ')'] - [':', ';'] - ] - scripts: [ - 'extern/jsforth/jsforth.js' - ] - includes: [] - engine: 'langs/forth/jsrepl_forth.coffee' - minifier: 'closure' - -@JSREPL::Languages::lua = - system_name: 'lua' - name: 'Lua' - extension: 'lua' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'util/utf8.coffee' - 'extern/lua/lua.closure.js' - ] - includes: [] - engine: 'langs/lua/jsrepl_lua.coffee' - minifier: 'none' - emscripted: true - -@JSREPL::Languages::python = - system_name: 'python' - name: 'Python' - extension: 'py' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'util/utf8.coffee' - { - opera: 'extern/python/unclosured/python.js' - default: 'extern/python/reloop-closured/python.js' - } - ] - includes: [ - 'extern/python/unclosured' - 'extern/python/closured' - 'extern/python/reloop-closured' - ] - engine: 'langs/python/jsrepl_python.coffee' - minifier: 'none' - emscripted: true - @JSREPL::Languages::ruby = system_name: 'ruby' name: 'Ruby' @@ -309,20 +54,3 @@ engine: 'langs/ruby/jsrepl_ruby.coffee' minifier: 'none' emscripted: true - -@JSREPL::Languages::roy = - system_name: 'roy' - name: 'Roy' - extension: 'roy' - matchings: [ - ['(', ')'] - ['[', ']'] - ['{', '}'] - ] - scripts: [ - 'extern/roy/bundled-roy.js' - 'util/console.js' - ] - includes: [] - engine: 'langs/roy/jsrepl_roy.coffee' - minifier: 'closure'