Jeremy Ashkenas
740a7bcb45
Merge pull request #2914 from danielgtaylor/repl-history
...
repl history implementation improvements
2013-04-07 21:47:16 -07:00
Daniel G. Taylor
0e2d2ea637
Move lastLine setter into conditional block to prevent .commands and blank lines from setting lastLine
2013-04-07 11:28:59 -07:00
Daniel G. Taylor
feaea49eac
Replace large comprehension with much simpler code; fix comment to reference maxSize instead of previous 10KB limit; only pop a history entry if the file size is actually bigger than maxSize; only add items to the history if they are different from the last item by storing the last line and loading it on startup.
2013-04-06 22:10:08 -07:00
Jeremy Ashkenas
170f311101
Merge branch 'master' of https://github.com/jashkenas/coffee-script
2013-04-06 09:31:30 +08:00
Jeremy Ashkenas
0cadcdc097
Fix regression with executable class bodies and prototypal attachment.
2013-04-06 09:31:24 +08:00
Jeremy Ashkenas
8be65dee93
Merge pull request #2886 from danielgtaylor/repl-history
...
Add history to the coffee interactive interpreter that persists between ...
2013-03-27 15:55:15 -07:00
Daniel G. Taylor
4dbd9dc264
Pop off partial line if input history file was truncated; make maximum input history file size configurable via repl start options
2013-03-25 20:50:56 -07:00
Daniel G. Taylor
2d0e45c46d
Use string interpolation for .history command; rename out variable to history an store the history in it as an array in the proper order so that printing it is just a join operation
2013-03-25 20:34:04 -07:00
Nami-Doc
53a5f26430
fix #2846
2013-03-25 18:56:24 +01:00
Daniel G. Taylor
a1ff4ae7b8
Use separate variable for fd used to read history file; use string interpolation to print code lines; do not use unit test to remove temporary file and instead use a process exit event handler
2013-03-25 09:49:59 -07:00
Daniel G. Taylor
17a1cdb2cf
Make history file optional and configurable via the opts passed to repl.start
2013-03-25 08:46:40 -07:00
Daniel G. Taylor
1643f7df7a
Remove explicit catch that did nothing
2013-03-25 07:49:25 -07:00
Daniel G. Taylor
3c0344b954
Rebuild to remove debugging log statement
2013-03-25 07:28:55 -07:00
Daniel G. Taylor
9bfafb88cb
Add history to the coffee interactive interpreter that persists between sessions using a ~/.coffee_history file in a similar way to bash. Code based on repl.history and Node pull request 3178 with modifications.
2013-03-24 22:44:35 -07:00
Marc Häfner
1b2fe69a18
Fix Windows path separator issue in baseFileName.
...
Windows accepts forward and backward slashes as path separator.
2013-03-20 22:38:29 +01:00
Romain Beauxis
6dd61626d2
Rebuild.
2013-03-18 14:16:05 -05:00
Jeremy Ashkenas
78d10f30a0
removing sourceColumn reset
2013-03-18 21:50:40 +08:00
Jeremy Ashkenas
194baa0bd7
better docs for source maps
2013-03-18 19:46:19 +08:00
Jeremy Ashkenas
c8b8beb500
slimming SourceMap slightly further
2013-03-18 19:36:34 +08:00
Jeremy Ashkenas
6786bab2ba
Big refactor of SourceMap class. Literate CoffeeScript. Purdy.
2013-03-18 19:23:05 +08:00
Jeremy Ashkenas
566a7dabb2
Fixing erroneous whitespace fix in generated JS
2013-03-18 17:47:55 +08:00
Jeremy Ashkenas
a3e8de338a
CoffeeScript 1.6.2
2013-03-18 13:06:33 +08:00
Jeremy Ashkenas
4f815ea978
Fixes #2737 , fix fork() for both .js and .coffee, revised.
2013-03-18 11:46:54 +08:00
Michael Ficarra
84c44c0099
small stylistic change and optimisation to code from #2847
2013-03-17 21:50:20 -05:00
Hao-kang Den
011d7dc245
better naming by @michaelficarra
2013-03-18 10:23:33 +08:00
Hao-kang Den
5fb047930e
fixed lineno
2013-03-18 09:31:12 +08:00
Hao-kang Den
c24e957f17
use btoa as base64 encoder, inspired by @ashtuchkin
2013-03-18 09:31:12 +08:00
Jeremy Ashkenas
9d025df9e3
Merge pull request #2827 from hden/lineno
...
Lineno
2013-03-17 04:29:44 -07:00
Jeremy Ashkenas
2f5b11b295
Fixes #2555
2013-03-17 19:27:16 +08:00
Jeremy Ashkenas
c44826acc7
Merge pull request #2838 from marchaefner/master
...
Improve literal mode.
2013-03-17 03:49:06 -07:00
Matt Kunze
f217a10721
fix path handling on Windows
2013-03-15 16:13:04 -06:00
Marc Häfner
b8d695a4e1
Compiled JavaScript files for improved literal mode.
2013-03-15 03:26:12 +01:00
Hao-kang Den
d4254a40a9
Apply modifications by @jwalton
2013-03-14 08:36:07 +08:00
Hao-kang Den
052e3cc8eb
found a linear shift of lineno, dirty patch for now
...
It seems that js -> coffee line mapping has a linear shifting.
Dirty patch by applying linear correction.
Dumb, but maybe a hint.
2013-03-14 08:36:07 +08:00
Jeremy Ashkenas
56413ba3b4
Merge pull request #2817 from epidemian/keep-repl-running
...
Keep REPL running on runtime errors
2013-03-13 01:56:33 -07:00
Jeremy Ashkenas
71bb6108fb
Merge pull request #2819 from hden/fix-path
...
Quick fix for node v0.10 path
2013-03-13 01:03:57 -07:00
Hao-kang Den
7d08dbb86c
build
2013-03-13 16:00:57 +08:00
Michael Ficarra
4ac223b684
minor cleanup of parent commit
2013-03-12 21:11:48 -05:00
Wil Chung
70e83030a7
added warning that we need node 0.8+ to run repl
...
remove unnecessary parens and else statement in repl
we do this by convention of the main coffee source
fix: exit should be process.exit
compiled and build full
2013-03-12 18:28:48 -07:00
Hao-kang Den
d3263dc35b
fix node v0.10 path
2013-03-12 20:53:13 +08:00
Hao-kang Den
9b6772a390
accept override
2013-03-12 15:29:13 +08:00
Hao-kang Den
b7f0653a0e
port patchStackTrace from Redux
2013-03-12 15:29:13 +08:00
Demian Ferreiro
45bcd9fa2f
Keep REPL running on runtime errors
2013-03-11 23:58:00 -03:00
Demian Ferreiro
5a004425ca
Fixes #1829 . Preserve variable scope in the REPL
2013-03-11 19:52:18 -03:00
Demian Ferreiro
f0fcf4aee0
Merge branch 'master' of git://github.com/jashkenas/coffee-script into improved-error-messages
...
Conflicts:
lib/coffee-script/coffee-script.js
lib/coffee-script/command.js
lib/coffee-script/helpers.js
lib/coffee-script/lexer.js
lib/coffee-script/nodes.js
lib/coffee-script/repl.js
src/coffee-script.coffee
src/command.coffee
src/helpers.coffee
src/lexer.coffee
src/nodes.coffee
test/helpers.coffee
2013-03-10 20:29:36 -03:00
Demian Ferreiro
09f8df9640
Add check for end of input on parseError handler
2013-03-10 00:30:27 -03:00
Jeremy Ashkenas
dbb99f31a7
Reverting #2490
2013-03-10 07:21:00 +08:00
Jeremy Ashkenas
b44435ab8a
#2490 -- implementing a conditional in terms of the guard style.
2013-03-10 06:44:45 +08:00
Jeremy Ashkenas
c53df12ec1
disallow multiple else blocks in if/guard syntax
2013-03-09 15:44:45 +08:00
Jeremy Ashkenas
13fae12f69
Fixes #2490 -- adding guard-style if blocks
2013-03-09 10:40:37 +08:00