diff options
author | Rajan Arora <rarora@redhat.com> | 2008-10-09 19:58:30 -0400 |
---|---|---|
committer | Rajan Arora <rarora@redhat.com> | 2008-10-09 19:58:30 -0400 |
commit | 1b1b4cebda9ceaa7a2a2b695a32ecb2588045076 (patch) | |
tree | d40f4da6cd854250b2523ddc5ab0563efef050d7 /parse.h | |
parent | e2607b19ce56830d64affed6a8ab169697bf2ccf (diff) | |
download | systemtap-steved-1b1b4cebda9ceaa7a2a2b695a32ecb2588045076.tar.gz systemtap-steved-1b1b4cebda9ceaa7a2a2b695a32ecb2588045076.tar.xz systemtap-steved-1b1b4cebda9ceaa7a2a2b695a32ecb2588045076.zip |
Display source context for error and warning messages (6701)
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -18,11 +18,14 @@ #include <stdexcept> #include <stdint.h> +struct stapfile; + struct source_loc { std::string file; unsigned line; unsigned column; + stapfile* stap_file; }; std::ostream& operator << (std::ostream& o, const source_loc& loc); @@ -71,6 +74,8 @@ class lexer public: token* scan (bool wildcard=false); lexer (std::istream&, const std::string&, systemtap_session&); + std::string get_input_contents (); + void set_current_file (stapfile* f); private: int input_get (); @@ -79,16 +84,15 @@ private: int input_peek (unsigned n=0); std::istream& input; std::string input_name; - std::vector<char> input_contents; + std::string input_contents; int input_pointer; // index into input_contents unsigned cursor_suspend_count; unsigned cursor_line; unsigned cursor_column; systemtap_session& session; + stapfile* current_file; }; - -struct stapfile; struct probe; struct probe_alias; struct vardecl; |