diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /microbe/expression.h | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'microbe/expression.h')
-rw-r--r-- | microbe/expression.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/microbe/expression.h b/microbe/expression.h index 9607f16..1e34bb8 100644 --- a/microbe/expression.h +++ b/microbe/expression.h @@ -23,7 +23,7 @@ #include "microbe.h" -#include <qstring.h> +#include <tqstring.h> class PIC14; class BTreeNode; @@ -69,13 +69,13 @@ class Expression * is generated from the expression string; then that tree is traversed * to generate the assembly. */ - void compileExpression( const QString & expression); - void compileConditional( const QString & expression, Code * ifCode, Code * elseCode ); + void compileExpression( const TQString & expression); + void compileConditional( const TQString & expression, Code * ifCode, Code * elseCode ); /** * Returns a *number* rather than evaluating code, and sets isConstant to true * if it the expression evaluated to a constant. */ - QString processConstant( const QString & expr, bool * isConsant ); + TQString processConstant( const TQString & expr, bool * isConsant ); private: PIC14 *m_pic; @@ -86,20 +86,20 @@ class Expression bool isUnaryOp(Operation op); - void expressionValue( QString expression, BTreeBase *tree, BTreeNode *node ); + void expressionValue( TQString expression, BTreeBase *tree, BTreeNode *node ); void doOp( Operation op, BTreeNode *left, BTreeNode *right ); void doUnaryOp( Operation op, BTreeNode *node ); /** * Parses an expression, and generates a tree structure from it. */ - void buildTree( const QString & expression, BTreeBase *tree, BTreeNode *node, int level ); + void buildTree( const TQString & expression, BTreeBase *tree, BTreeNode *node, int level ); - static int findSkipBrackets( const QString & expr, char ch, int startPos = 0); - static int findSkipBrackets( const QString & expr, QString phrase, int startPos = 0); + static int findSkipBrackets( const TQString & expr, char ch, int startPos = 0); + static int findSkipBrackets( const TQString & expr, TQString phrase, int startPos = 0); - QString stripBrackets( QString expression ); + TQString stripBrackets( TQString expression ); - void mistake( Microbe::MistakeType type, const QString & context = 0 ); + void mistake( Microbe::MistakeType type, const TQString & context = 0 ); SourceLine m_sourceLine; @@ -113,8 +113,8 @@ class Expression * 2 = expression that needs evaluating * (maybe not, see enum). */ - ExprType expressionType( const QString & expression ); - static bool isLiteral( const QString &text ); + ExprType expressionType( const TQString & expression ); + static bool isLiteral( const TQString &text ); /** * Normally, only allow numbers upto 255; but for some uses where the * number is not going to be placed in a PIC register (such as when |