Mercurial > hg > octave-nkf
changeset 20066:734a77207e2e
maint: Periodic merge of stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Feb 2015 12:04:01 -0500 |
parents | bf511802add7 (current diff) 77f65eabac20 (diff) |
children | e8ccfc5d892b |
files | libinterp/parse-tree/lex.ll libinterp/parse-tree/token.cc libinterp/parse-tree/token.h |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -2594,8 +2594,7 @@ if ((reading_fcn_file || reading_script_file || reading_classdef_file) && ! fcn_file_full_name.empty ()) - tok_val = new token (magic_file_kw, true, - fcn_file_full_name, l, c); + tok_val = new token (magic_file_kw, fcn_file_full_name, l, c); else tok_val = new token (magic_file_kw, "stdin", l, c); }
--- a/libinterp/parse-tree/token.cc +++ b/libinterp/parse-tree/token.cc @@ -52,6 +52,17 @@ type_tag = is_kw ? keyword_token : generic_token; } +token::token (int tv, const char *s, int l, int c) +{ + maybe_cmd = false; + tspc = false; + line_num = l; + column_num = c; + tok_val = tv; + type_tag = string_token; + str = new std::string (s); +} + token::token (int tv, const std::string& s, int l, int c) { maybe_cmd = false;
--- a/libinterp/parse-tree/token.h +++ b/libinterp/parse-tree/token.h @@ -63,6 +63,7 @@ token (int tv, int l = -1, int c = -1); token (int tv, bool is_keyword, int l = -1, int c = -1); + token (int tv, const char *s, int l = -1, int c = -1); token (int tv, const std::string& s, int l = -1, int c = -1); token (int tv, double d, const std::string& s = std::string (), int l = -1, int c = -1);