Mercurial > octave
view libinterp/parse-tree/pt-walk.cc @ 23424:872f42fb26dc
let walker visit tree_boolean and tree_compound_binary expressions directly
* pt-walk.cc: New file.
* module.mk: Update
* pt-walk.h, pt-walk.cc (tree_walker::visit_boolean_expression,
tree_walker::visit_compound_binary_expression): New methods.
* pt-binop.h, pt-binop.cc (tree_boolean_expression::accept):
New function.
* pt-cbinop.h, pt-cbinop.cc (tree_compound_binary_expression::accept):
Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Apr 2017 12:52:32 -0400 |
parents | |
children | 194eb4bd202b |
line wrap: on
line source
/* Copyright (C) 2017 John W. Eaton This file is part of Octave. Octave is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Octave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Octave; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ #if defined (HAVE_CONFIG_H) # include "config.h" #endif #include "pt-binop.h" #include "pt-cbinop.h" #include "pt-walk.h" namespace octave { void tree_walker::visit_boolean_expression (tree_boolean_expression& expr) { visit_binary_expression (expr); } void tree_walker::visit_compound_binary_expression (tree_compound_binary_expression& expr) { visit_binary_expression (expr); } }