mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Fix command completion under nodejs v6.9.1 (#4402)
* Fix command completion under nodejs v6.9.1 Closes #4397 * Commit updated compiled version
This commit is contained in:
parent
81174187f5
commit
07d6eb6af5
2 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
var Assign, Block, Literal, Value, ast, err, js, ref1, referencedVars, token, tokens;
|
||||
input = input.replace(/\uFF00/g, '\n');
|
||||
input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1');
|
||||
input = input.replace(/^\s*try\s*{([\s\S]*)}\s*catch.*$/m, '$1');
|
||||
ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal;
|
||||
try {
|
||||
tokens = CoffeeScript.tokens(input);
|
||||
|
|
|
@ -15,6 +15,9 @@ replDefaults =
|
|||
# Node's REPL sends the input ending with a newline and then wrapped in
|
||||
# parens. Unwrap all that.
|
||||
input = input.replace /^\(([\s\S]*)\n\)$/m, '$1'
|
||||
# Node's REPL v6.9.1+ sends the input wrapped in a try/catch statement.
|
||||
# Unwrap that too.
|
||||
input = input.replace /^\s*try\s*{([\s\S]*)}\s*catch.*$/m, '$1'
|
||||
|
||||
# Require AST nodes to do some AST manipulation.
|
||||
{Block, Assign, Value, Literal} = require './nodes'
|
||||
|
|
Loading…
Add table
Reference in a new issue