I was looking back through this and I missed a change that I had made.
At the end of the op section, where I call buffer.clear(), that needs to be moved outside of the if(!op) block, and the op = ch above it is redundant. So what was:
Code:
};
op = ch;//save current operator and continue parsing
buffer.clear();//clear buffer now that we're starting on a new number
}
op = ch;
}
should be:
Code:
};
}
buffer.clear();//clear buffer now that we're starting on a new number
op = ch;
}