code: func (t *tree) parseSwitch(token item, end itemType) ast.Node {
  	const ctx = "switch"
  	var switchValue = t.parseExpr(0)
  	t.expect(itemRightDelim, ctx)
  
  	var cases []*ast.SwitchCaseNode
  	for {
  		switch tok := t.next(); tok.typ {
  		case itemLeftDelim:
  		case itemText: // ignore spaces between tags. text is an error though.
  			if allSpace(tok.val) {
  				continue
  			}
  			t.unexpected(tok, "between switch cases")
  		case itemCase, itemDefault:
  			cases = append(cases, t.parseCase(tok))
  		case end:
  			t.expect(itemRightDelim, ctx)
  			return &ast.SwitchNode{token.pos, switchValue, cases}
  		}
  	}
  }
docs: // "switch" has just been read.