User Guide
implicit_argument_visitor.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 Blue Brain Project, EPFL.
3  * See the top-level LICENSE file for details.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #pragma once
9 
10 /**
11  * \file
12  * \brief \copybrief nmodl::visitor::ImplicitArgumentVisitor
13  */
14 
15 #include "visitors/ast_visitor.hpp"
16 
17 
18 namespace nmodl {
19 namespace visitor {
20 
21 /**
22  * \addtogroup visitor_classes
23  * \{
24  */
25 
26 /**
27  * \class ImplicitArgumentVisitor
28  * \brief %Visitor for adding implicit arguments to [Core]NEURON functions.
29  *
30  * This visitor is used to add implicit arguments to functions (nrn_ghk, ...)
31  * that have historially been used in MOD files with "fewer" arguments and
32  * relied on global state, but which now need "more" arguments to be passed so
33  * that they can be pure functions.
34  */
36  void visit_function_call(ast::FunctionCall& node) override;
37 };
38 
39 /** \} */ // end of visitor_classes
40 
41 } // namespace visitor
42 } // namespace nmodl
nmodl
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
nmodl::ast::FunctionCall
TODO.
Definition: function_call.hpp:38
nmodl::visitor::AstVisitor
Concrete visitor for all AST classes.
Definition: ast_visitor.hpp:37
nmodl::visitor::ImplicitArgumentVisitor::visit_function_call
void visit_function_call(ast::FunctionCall &node) override
visit node of type ast::FunctionCall
Definition: implicit_argument_visitor.cpp:18
nmodl::visitor::ImplicitArgumentVisitor
Visitor for adding implicit arguments to [Core]NEURON functions.
Definition: implicit_argument_visitor.hpp:35
ast_visitor.hpp
Concrete visitor for all AST classes.