KDevelop API Documentation

languages/pascal/PascalAST.hpp

Go to the documentation of this file.
00001 #ifndef PASCALAST_HPP 00002 #define PASCALAST_HPP 00003 00004 #include <antlr/CommonAST.hpp> 00005 00006 class PascalAST; 00007 typedef antlr::ASTRefCount<PascalAST> RefPascalAST; 00008 00009 class PascalAST : public antlr::CommonAST { 00010 public: 00011 PascalAST() 00012 : m_line(0), m_column(0) {} 00013 00014 ~PascalAST() {} 00015 00016 int getLine() const { return m_line; } 00017 void setLine( int line ) { m_line = line; } 00018 00019 int getColumn() const { return m_column; } 00020 void setColumn( int column ) { m_column = column; } 00021 00022 void initialize( antlr::RefToken t ) { 00023 antlr::CommonAST::initialize(t); 00024 m_line = t->getLine() - 1; 00025 m_column = t->getColumn() - 1; 00026 } 00027 00028 void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt) { 00029 setType(t); 00030 setText(txt); 00031 m_line = 0; 00032 m_column = 0; 00033 } 00034 00035 void addChild( RefPascalAST c ) { 00036 antlr::RefAST n( c.get() ); 00037 antlr::BaseAST::addChild( n ); 00038 } 00039 00040 static antlr::RefAST factory( void ) { 00041 RefPascalAST n(new PascalAST); 00042 return n.get(); 00043 } 00044 00045 private: 00046 int m_line; 00047 int m_column; 00048 }; 00049 00050 00051 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:44 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003