Commit graph

124 commits

Author SHA1 Message Date
ridiculousfish
7ac593273e Remove a bunch of dead code identified by cppcheck 2014-10-31 01:15:50 -07:00
ridiculousfish
8ed08872b9 Remove the now-unused parser_t::job_create 2014-04-14 12:40:17 -07:00
ridiculousfish
7a75e7341b Eliminate the parser_use_ast switch, which does nothing, and
exec_no_exec, which also does nothing in the new parser
2014-04-14 11:12:40 -07:00
ridiculousfish
0d3169ef70 Run restyle.sh to enforce style rules. 2014-03-31 10:01:39 -07:00
ridiculousfish
12025e3050 Remove unused err_buff variable from parser_t 2014-03-22 01:04:49 -07:00
ridiculousfish
ad6367018b Excise use of parser_t's error() functionality. Thread a
parse_error_list_t through all of the expand functions, enabling them to
report errors more directly. Improve aspects of error reporting for
expansion failures.
2014-03-21 17:13:33 -07:00
ridiculousfish
c71b168402 Remove current_tokenizer and current_tokenizer_pos from old parser 2014-03-20 21:32:03 -07:00
ridiculousfish
4deb46290d Remove additional dead code from old parser 2014-03-20 21:32:03 -07:00
ridiculousfish
e5ef45e4c0 Rewrite parser_t::test_args and parser_t::eval_args to use new parser 2014-03-20 21:32:02 -07:00
ridiculousfish
1c58b6d83e Rewrite parser_t::eval_args to use new AST parser 2014-03-20 21:32:02 -07:00
ridiculousfish
3cfdc6d126 Fix line number reporting in new parser 2014-03-20 21:32:02 -07:00
ridiculousfish
8ec73b2dd4 Removing some variables from parser_t that are no longer used in the new
execution model
2014-03-20 21:32:02 -07:00
ridiculousfish
5c54ef7b0d Merge branch 'master' into parser_cleanup 2014-03-15 20:24:25 -07:00
ridiculousfish
6c096191ba Remove support for invoking old pager 2014-03-15 13:46:15 -07:00
ridiculousfish
cc12225142 Clean up various block types and state as part of new parser 2014-03-02 13:46:30 -08:00
ridiculousfish
84ea96f383 Begin removing remnants of old parser 2014-02-28 20:01:04 -08:00
ridiculousfish
adf5b036d6 Fix to stop reporting config.fish execution as coming from "standard
input" within backtraces
2014-02-20 10:57:13 -08:00
ridiculousfish
414530c9c2 Partially rework profiling. Fix profiling crash with new parser. Fixes
1295
2014-02-09 14:04:43 -08:00
ridiculousfish
0fbddb0df1 Add fish_new_pager variable to enable new pager on request, disabled by default. 2014-01-24 18:10:42 -08:00
ridiculousfish
53814983ff Update style and formatting to conform to fish style guide. 2014-01-15 01:40:40 -08:00
ridiculousfish
993148552e Support for Ctrl-C cancellation in new parser. Added tests for it too. 2014-01-02 16:19:33 -08:00
ridiculousfish
6ce4b344e4 Hook up for statements, if statements, and function definition in new
parser
2013-12-27 01:38:43 -08:00
ridiculousfish
6536ffe178 Facilities for turning on new AST-based parser. 2013-12-26 13:24:10 -08:00
ridiculousfish
562946d055 Cleanup thrashing around in parser_t. New parser execution lives in
parse_execution.cpp
2013-12-26 12:55:10 -08:00
ridiculousfish
924b8cbe24 New ideas about how to use new parser for execution. Beginnings of
implementation.
2013-12-26 12:24:00 -08:00
ridiculousfish
5b1a532652 Factor execution aspects from parser_t to parse_execution_context_t .
Still searching for best way to use new parser for execution.
2013-12-24 13:17:24 -08:00
ridiculousfish
b6af3e51ab Very early work in adopting new parser for actual execution of commands.
Not turned on yet.
2013-12-23 14:53:56 -08:00
ridiculousfish
ed70195c7e Merge branch 'master' into ast
Conflicts:
	function.cpp
	parser.cpp
	parser.h
2013-12-20 17:44:37 -08:00
ridiculousfish
e38217683c Refactor block_t storage in parser_t from a linked list to a vector 2013-12-20 17:41:21 -08:00
ridiculousfish
739e529416 Initial flailing around trying to adopt new parser for actual execution 2013-12-20 14:37:40 -08:00
ridiculousfish
384987cd5b Remove detect_errors2 2013-12-16 22:32:08 -08:00
ridiculousfish
5b24aac266 Initial work on backtrace support with new parser 2013-12-15 16:05:37 -08:00
ridiculousfish
5cf59de676 Finish rewriting detect_errors to use new parser. All tests now pass (!) 2013-12-12 18:18:07 -08:00
ridiculousfish
d5d9b9284a Initial work towards rewriting detect_errors to use new parser.
Low-level tests currently pass; high level tests fail.
2013-12-11 18:34:28 -08:00
ridiculousfish
925fe65dd8 Remove the indentation part of parser_t::test(). Rename it to
detect_errors().
2013-12-08 16:25:07 -08:00
ridiculousfish
dd0cc5ed9f Rewriting indenting functionality to use new parser 2013-12-08 13:41:12 -08:00
ridiculousfish
dd91779442 Merge branch 'master' into ast_no_templates
Conflicts:
	configure.ac
	exec.cpp
2013-10-06 13:08:57 -07:00
ridiculousfish
4899086b3c Big fat refactoring of how redirections work. In fish 1.x and 2.0.0, the redirections for a process were flattened into a big list associated with the job, so there was no way to tell which redirections applied to each process. Each process therefore got all the redirections associated with the job. See https://github.com/fish-shell/fish-shell/issues/877 for how this could manifest.
With this change, jobs only track their block-level redirections. Process level redirections are correctly associated with the process, and at exec time we stitch them together (block, pipe, and process redirects).

This fixes the weird issues where redirects bleed across pipelines (like #877), and also allows us to play with the order in which redirections are applied, since the final list is constructed right before it's needed.  This lets us put pipes after block level redirections but before process level redirections, so that a 2>&1-type redirection gets picked up after the pipe, i.e. it should fix https://github.com/fish-shell/fish-shell/issues/110

This is a significant change. The tests all pass. Cross your fingers.
2013-08-19 18:06:24 -07:00
ridiculousfish
048f08080d Rename expression.h to parse_tree.h and parse_exec.h 2013-06-09 14:21:24 -07:00
ridiculousfish
1879dc4b59 Initial set of changes working to make fish robust against running out of file descriptors 2013-01-30 02:22:38 -08:00
ridiculousfish
92b2376c23 Indent switch + case properly. https://github.com/fish-shell/fish-shell/issues/530 2013-01-24 14:59:52 -08:00
Jan Kanis
44f70d2b52 stop profile switch from crashing (issue #517); also make print_profile use a loop instead of recursion 2013-01-14 00:49:32 +01:00
ridiculousfish
37bdb20092 Make event_block_t.event not a reference
Stylistic tweaks
2012-12-22 12:40:34 -08:00
Jan Kanis
8a446f43ff include fixes and suggestions from code review 2012-12-22 18:38:28 +01:00
ridiculousfish
f545fb2491 Work towards refactoring tokenizer to be a real object 2012-11-21 17:48:35 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
7bb844a778 Fix bug where 'else if' does not support functions and redirections
https://github.com/fish-shell/fish-shell/issues/359
2012-11-04 17:11:02 -08:00
ridiculousfish
1a59346b51 Changed "elseif" to "else if" 2012-09-03 13:24:01 -07:00
ridiculousfish
ff124465fd Clean up some warnings and some unused if-related code 2012-09-01 12:29:00 -07:00