mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 17:27:59 -05:00
@@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript 1.2.1-pre
|
||||
(function() {
|
||||
var ACCESSOR, CoffeeScript, Module, REPL_CHOMP, REPL_PROMPT, REPL_PROMPT_CONTINUATION, REPL_PROMPT_MULTILINE, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, multilineMode, pipedInput, readline, repl, run, stdin, stdout;
|
||||
var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, REPL_PROMPT_MULTILINE, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, multilineMode, pipedInput, readline, repl, run, stdin, stdout;
|
||||
|
||||
stdin = process.openStdin();
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
REPL_PROMPT_CONTINUATION = '......> ';
|
||||
|
||||
REPL_CHOMP = /(\n|\r)+$/;
|
||||
|
||||
enableColours = false;
|
||||
|
||||
if (process.platform !== 'win32') {
|
||||
@@ -94,7 +92,7 @@
|
||||
|
||||
run = function(buffer) {
|
||||
var code, returnValue, _;
|
||||
buffer = buffer.replace(REPL_CHOMP, "");
|
||||
buffer = buffer.replace(/[\r\n]+$/, "");
|
||||
if (multilineMode) {
|
||||
backlog += "" + buffer + "\n";
|
||||
repl.setPrompt(REPL_PROMPT_CONTINUATION);
|
||||
|
||||
@@ -21,7 +21,6 @@ Module = require 'module'
|
||||
REPL_PROMPT = 'coffee> '
|
||||
REPL_PROMPT_MULTILINE = '------> '
|
||||
REPL_PROMPT_CONTINUATION = '......> '
|
||||
REPL_CHOMP = /(\n|\r)+$/
|
||||
enableColours = no
|
||||
unless process.platform is 'win32'
|
||||
enableColours = not process.env.NODE_DISABLE_COLORS
|
||||
@@ -76,7 +75,7 @@ backlog = ''
|
||||
# Attempt to evaluate the command. If there's an exception, print it out instead
|
||||
# of exiting.
|
||||
run = (buffer) ->
|
||||
buffer = buffer.replace REPL_CHOMP, ""
|
||||
buffer = buffer.replace /[\r\n]+$/, ""
|
||||
if multilineMode
|
||||
backlog += "#{buffer}\n"
|
||||
repl.setPrompt REPL_PROMPT_CONTINUATION
|
||||
|
||||
Reference in New Issue
Block a user