aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-21 11:24:49 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-22 18:08:00 -0700
commitc1bd3b5824027f23b41bbac77c5e28f856c5dc18 (patch)
treef406ad2f859df99f65c059f8c4019d5a2db1e459 /src/parser.h
parentfb615843b329b4d3c303b9cebe2af134a52b5bfd (diff)
Eliminate global variables associated with builtin IO
This change eliminates global variables like stdout_buffer. Instead we wrap up the IO information into a new struct io_streams_t, and thread that through every builtin. This makes the intent clearer, gives us a place to hang new IO data, and eliminates the ugly global state management like builtin_push_io.
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parser.h b/src/parser.h
index d7ee0570..13fa6d16 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -280,6 +280,9 @@ private:
*/
const wchar_t *is_function() const;
+ /* Helper for stack_trace() */
+ void stack_trace_internal(size_t block_idx, wcstring *out) const;
+
public:
/** Get the "principal" parser, whatever that is */
@@ -425,9 +428,9 @@ public:
const wchar_t *current_filename() const;
/**
- Write a stack trace starting at the specified block to the specified wcstring
+ Return a string representing the current stack trace
*/
- void stack_trace(size_t block_idx, wcstring &buff) const;
+ wcstring stack_trace() const;
};
#endif