Minor cleanup

This commit is contained in:
arookas 2016-02-01 06:23:59 -05:00
parent f00b7c4296
commit 9373c59c44
3 changed files with 4 additions and 8 deletions

View file

@ -21,9 +21,7 @@ namespace arookas {
}
static void CompileExpression(sunCompiler compiler, sunExpression expression, Stack<sunOperator> operatorStack) {
// this implementation assumes that the expression production child list alternates between operand and operator
// we can safely assume this as the grammar "operand {binary_operator operand}" enforces it
int stackCount = operatorStack.Count;
var stackCount = operatorStack.Count;
foreach (var node in expression) {
if (node is sunOperand) {
var operand = node as sunOperand;

View file

@ -199,10 +199,8 @@ namespace arookas {
mLocalStack.Push(mLocal++);
}
public void PopLocal() {
if (mLocalStack.Count > 0) {
mLocalStack.Pop();
}
}
// system symbols
void AddSystemSymbols() {