function stateStack(indent, type, prev) { // represents a state stack object
        this.indent = indent;
        this.type = type;
        this.prev = prev;
    }
Author: Koh Zi Han, based on implementation by Koh Zi Chun