Commit Graph

85 Commits

Author SHA1 Message Date
Mark Harrah 684dda144f SoftInvalid parser, which defers being invalid in order to preserve a failure message on empty input. 2013-06-17 12:06:13 -04:00
Mark Harrah a4bad86614 invalid/failure Parser construction methods now accept definitive flag 2013-06-17 12:06:13 -04:00
Mark Harrah c269706750 Merge failures from a,b in a|b when a,b fail on the same input position.
Previously, only the failures from b were used.
2013-06-17 12:06:13 -04:00
Mark Harrah 676c93043c 'definitive' Parser failures
Support a definitive flag for Failure that ignores later failures
instead of appending them.  This is useful to override the default
behavior of listing the failures of alternative parsers.
2013-06-17 12:06:13 -04:00
Mark Harrah 3e32c7d1f1 changes needed for tests for jline 2.10 2013-02-26 09:27:57 -05:00
Mark Harrah 45aae0cdc6 add Jline.createReader() back for source compatibility 2013-02-26 09:27:56 -05:00
Alex Dupre 92e99cfef0 Switch from JLine 1.0 to 2.10. 2013-02-26 07:39:33 -05:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah c0b1bb51e6 -Xlint 2013-02-04 17:30:31 -05:00
Mark Harrah 3035cbf2d1 update version for backported Parser deprecations 2013-01-03 17:40:07 -05:00
Mark Harrah 4434d84f65 require a failure message for parser 2013-01-03 11:37:40 -05:00
Mark Harrah 935267b96b minor cleanup of previous commit: var->val in sbt.JLine 2012-12-20 09:25:35 -05:00
Anthony f7031502e4 Multi-line prompt text offset issue (ticket #625) 2012-12-20 08:56:20 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Mark Harrah 1c1e5c4977 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -05:00
Mark Harrah 1612af8dbb Parser.failOnException method, don't let rhs of alias fail the parse. Fixes #572.
alias only parses the right hand side for tab completion help.
The assignment should happen whether or not the parse is successful because the
context may change by the time the alias is actually evaluated.
In particular, the 'set' command uses the loaded project for tab completion in 0.12.1.
When a .sbtrc file is processed, the project has not been loaded yet, so aliases
involving set fail.  Wrapping the rhs in failOnException addresses this.
2012-10-15 12:42:27 -04:00
Jason Zaugg 2ef0fcae6a Fix #552 Compensate for JLine's absent EOF detection.
In the unsupported terminal mode, JLine treats a broken
stdin as an endless stream of empty lines. This is problematic
for idea-sbt-plugin: if the IntelliJ process is forcibly killed
and leaves the child SBT process running, it consumes considerable
CPU processing these.

Patching JLine itself would be the cleanest solution (the change
has already been applied to JLine 2), but I've shied away from that
and instead wrapped the InputStream that is read by JLine to
intercept the result of -1 from read(). When this happens, the
flat `inputEof` is set to true.
2012-09-23 15:58:15 -04:00
Mark Harrah 8c06949957 clean up token completions and make providing a general completion function easier 2012-07-13 14:33:27 -04:00
Mark Harrah ce3ed37c8c basic code for cleaning up Manifest.toString 2012-07-13 14:33:27 -04:00
Mark Harrah 0972791b58 clean up Completions and allow arbitrary 'display' for Token 2012-07-13 14:33:27 -04:00
Mark Harrah 72e05309c5 JLine completion integration now considers a suggestion with a newline to be preformatted 2012-07-13 14:33:27 -04:00
Mark Harrah 51da95644c methods for working with Scala identifiers 2012-07-13 14:33:27 -04:00
Mark Harrah 5dd2bb8a24 print completions containing a newline first and on separate lines 2012-07-13 14:33:27 -04:00
Mark Harrah 8d20a7ea19 repeatDep parser combinator 2012-07-06 10:28:51 -04:00
Mark Harrah cf2402cea4 another fix related to #460 2012-05-23 20:13:52 -04:00
Mark Harrah e34b8e4bf2 print message and stack trace when exception occurs in completion 2012-05-21 22:23:44 -04:00
Mark Harrah 1f612aaecb ensure enableEcho called after jline.Terminal.getTerminal. fixes #460 2012-05-19 18:20:19 -04:00
Mark Harrah 12d72facb1 enhance 'projects' to allow temporarily adding/removing builds to the session 2012-04-06 20:28:31 -04:00
Mark Harrah 41eb26ae1f fix sample method interpretation of completions argument 2012-03-25 20:36:05 -04:00
Mark Harrah cf19af27dc fix argument parsing, which unintentionally required two characters. ref #396 2012-03-13 08:01:58 -04:00
e.e d3si9n 784c9ed024 fixes NotQuoted 2012-03-11 15:02:50 -04:00
e.e d3si9n 5a691fbb67 StringVerbatim is now stateless 2012-03-11 13:19:13 -04:00
e.e d3si9n 8545e912da removed Octal 2012-03-11 13:12:23 -04:00
e.e d3si9n 87c52f5f1b implemented parser for escaped string and verbatim string 2012-03-11 07:31:39 -04:00
Mark Harrah 65f51cdb85 convenience functions for testing parsers 2012-03-10 14:16:40 -05:00
Mark Harrah 1687cf8a8c handle absence of CONT signal 2012-03-09 13:38:45 -05:00
Mark Harrah 5b20d330c5 handle CONT signal to reset JLine after resuming from stop. fixes #394 2012-03-09 07:08:38 -05:00
Mark Harrah 3587777638 move error processing to complete/ 2012-03-09 07:08:38 -05:00
Mark Harrah 6a7eb6c937 Merge branch 'parsing_changes' into 0.12 2012-01-15 13:09:41 -05:00
Mark Harrah 9b5ab3cb09 work around unclosed jline history-related streams 2012-01-14 21:09:11 -05:00
Mark Harrah ec48779829 moved task axis before the key 2012-01-09 08:00:29 -05:00
Mark Harrah bca9ace1f7 fix 'not' parser combinator, add EOF 2011-12-13 17:29:08 -05:00
Mark Harrah 7a75acfe03 treat case differences differently 2011-12-13 17:15:05 -05:00
softprops 762bac2975 add support for a masked readline 2011-10-13 20:42:39 -04:00
Mark Harrah 705608d59d fix parser test 2011-10-01 14:40:14 -04:00
Mark Harrah 9ad15672d5 fix laziness of parser failure messages 2011-09-26 08:20:07 -04:00
Mark Harrah 541004419f provide consecutive tab press count for completion combinators 2011-09-20 20:51:47 -04:00
Mark Harrah 18b57bb101 fix ++ command to not require a space after it 2011-08-14 10:53:37 -04:00
Mark Harrah 70dcae84ee preserve key+configuration ambiguity through task+extra parsing. fixes #135 2011-08-05 21:59:49 -04:00
Mark Harrah d4c76b0d0e add ability to hide a token until it is explicitly started 2011-07-24 22:35:27 -04:00