code: function lex(text) {
    let root = new StyleNode();
    root['start'] = 0;
    root['end'] = text.length
    let n = root;
    for (let i = 0, l = text.length; i < l; i++) {
      if (text[i] === OPEN_BRACE) {
        if (!n['rules']) {
          n['rules'] = [];
        }
        let p = n;
        let previous = p['rules'][p['rules'].length - 1] || null;
        n = new StyleNode();
        n['start'] = i + 1;
        n['parent'] = p;
        n['previous'] = previous;
        p['rules'].push(n);
      } else if (text[i] === CLOSE_BRACE) {
        n['end'] = i + 1;
        n = n['parent'] || root;
      }
    }
    return root;
  }
docs: super simple {...} lexer that returns a node tree 
  @param {string} text
  @return {StyleNode}