26 #if ! defined (octave_token_h)
27 #define octave_token_h 1
29 #include "octave-config.h"
80 token (
int tv,
const std::string& s,
const filepos& beg_pos,
89 token (
int tv,
const std::string& mth,
const std::string& cls,
92 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (
token)
112 int line ()
const {
return m_beg_pos.line (); }
113 int column ()
const {
return m_beg_pos.column (); }
117 return m_type_tag == keyword_token || m_type_tag == ettype_token;
120 bool isstring ()
const {
return m_type_tag == string_token; }
122 std::string
text ()
const;
124 token_type ttype ()
const;
125 end_tok_type ettype ()
const;
127 std::string superclass_method_name ()
const;
128 std::string superclass_class_name ()
const;
130 std::string text_rep ()
const;
143 token_type m_type_tag;
149 tok_info (
const char *s) : m_str (new std::string (s)) { }
151 tok_info (
const std::string& str) : m_str (new std::string (str)) { }
155 tok_info (end_tok_type et) : m_et (et) { }
157 tok_info (
const std::string& meth,
const std::string& cls)
158 : m_superclass_info (new superclass_info (meth, cls))
161 OCTAVE_DISABLE_COPY_MOVE (tok_info)
175 : m_method_name (meth), m_class_name (cls)
200 std::string m_orig_text;
203 OCTAVE_END_NAMESPACE(
octave)
void mark_trailing_space()
bool token_value_is(int tv) const
void end_pos(const filepos &pos)
void beg_pos(const filepos &pos)
void mark_may_be_command()
bool may_be_command() const
bool space_follows_token() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
superclass_info(const std::string &meth, const std::string &cls)
std::string m_method_name
~superclass_info()=default