Modified the nodes of the AST to use 0/1 for bools internally. So all of the Relation...
authorMichael Welch <michaelgwelch@gmail.com>
Fri, 29 Dec 2006 02:03:36 +0000 (02:03 +0000)
committerMichael Welch <michaelgwelch@gmail.com>
Fri, 29 Dec 2006 02:03:36 +0000 (02:03 +0000)
commit15684a0e4c60095b023ac7f97ea30f4a21073db2
tree283995e10454808a0fef87727fb896493fe1fffd
parent4535ce3f854150e3a945c44cd95ae6099c67bdd9
Modified the nodes of the AST to use 0/1 for bools internally. So all of the RelationalExpressions now return BasicType.Boolean.

This requires that any time a bool is used in a place that a number is required a conversion to double is required. Likewise, if a double is on the stack and we need a .NET bool a conversion is required. So almost every Node needed to be modified.
19 files changed:
mbasic/SyntaxTree/Add.cs
mbasic/SyntaxTree/Assign.cs
mbasic/SyntaxTree/BasicType.cs
mbasic/SyntaxTree/BinaryOperator.cs [new file with mode: 0644]
mbasic/SyntaxTree/Division.cs
mbasic/SyntaxTree/Expression.cs
mbasic/SyntaxTree/For.cs
mbasic/SyntaxTree/Function.cs
mbasic/SyntaxTree/If.cs
mbasic/SyntaxTree/Multiply.cs
mbasic/SyntaxTree/Negative.cs
mbasic/SyntaxTree/Node.cs
mbasic/SyntaxTree/Power.cs
mbasic/SyntaxTree/Print.cs
mbasic/SyntaxTree/RelationalExpression.cs
mbasic/SyntaxTree/Subtract.cs
mbasic/SyntaxTree/Tab.cs
mbasic/mbasic.csproj
samples/ForStatementTest.mbas