changeset 19893: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	Tue Feb 24 21:38:21 2015 -0800
+++ b/libinterp/parse-tree/lex.ll	Wed Feb 25 12:04:01 2015 -0500
@@ -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	Tue Feb 24 21:38:21 2015 -0800
+++ b/libinterp/parse-tree/token.cc	Wed Feb 25 12:04:01 2015 -0500
@@ -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	Tue Feb 24 21:38:21 2015 -0800
+++ b/libinterp/parse-tree/token.h	Wed Feb 25 12:04:01 2015 -0500
@@ -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);