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,
116 int line (
void)
const {
return m_beg_pos.line (); }
117 int column (
void)
const {
return m_beg_pos.column (); }
121 return m_type_tag == keyword_token || m_type_tag == ettype_token;
124 bool isstring (
void)
const {
return m_type_tag == string_token; }
126 std::string text (
void)
const;
128 token_type ttype (
void)
const;
129 end_tok_type ettype (
void)
const;
131 std::string superclass_method_name (
void)
const;
132 std::string superclass_class_name (
void)
const;
134 std::string text_rep (
void)
const;
153 tok_info (
const char *s) : m_str (new std::string (s)) { }
155 tok_info (
const std::string& str) : m_str (new std::string (str)) { }
161 tok_info (
const std::string& meth,
const std::string& cls)
181 : m_method_name (meth), m_class_name (cls)
bool may_be_command(void) const
bool iskeyword(void) const
void mark_trailing_space(void)
void mark_may_be_command(void)
filepos beg_pos(void) const
bool token_value_is(int tv) const
bool isstring(void) const
filepos end_pos(void) const
void end_pos(const filepos &pos)
int token_value(void) const
void beg_pos(const filepos &pos)
token(const token &)=delete
bool space_follows_token(void) 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(void)=delete
~superclass_info(void)=default
superclass_info(const superclass_info &)=delete
tok_info(const tok_info &)=delete
superclass_info * m_superclass_info
tok_info(const std::string &meth, const std::string &cls)
tok_info(end_tok_type et)
tok_info(const octave_value &num)
tok_info(const std::string &str)