MicroModelicaCCompiler  4.5.3
ast_node.cpp
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  This file is part of QSS Solver.
4 
5  QSS Solver is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  QSS Solver is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17 
18  ******************************************************************************/
19 
20 #include "ast_node.hpp"
21 
22 #include <iostream>
23 #include <sstream>
24 
25 #include <ast/parser/mocc_parser.h>
26 using namespace std;
27 
28 AST_Node_::AST_Node_() { _linenum = MCC_Parser::lineno(); }
29 
30 ostream &operator<<(ostream &os, const AST_Node_ &n)
31 {
32  os << "Printing not implemented!!" << endl;
33  return os;
34 };
35 
36 ORDER_REL_IMP(AST_Node);
37 
38 void AST_Node_::setLineNum(int linenum) { _linenum = linenum; }
39 
40 int AST_Node_::lineNum() const { return _linenum; }
AST_Node_::lineNum
int lineNum() const
Definition: ast_node.cpp:40
operator<<
ostream & operator<<(ostream &os, const AST_Node_ &n)
Definition: ast_node.cpp:30
AST_Node_::AST_Node_
AST_Node_()
Definition: ast_node.cpp:28
ORDER_REL_IMP
ORDER_REL_IMP(AST_Node)
AST_Node_
Definition: ast_node.hpp:29
ast_node.hpp
AST_Node_::setLineNum
void setLineNum(int linenum)
Definition: ast_node.cpp:38