code: func (t *tree) parseDataRef(tok item) ast.Node {
  	var ref = &ast.DataRefNode{tok.pos, tok.val[1:], nil}
  	for {
  		var accessNode ast.Node
  		var nullsafe = 0
  		switch tok := t.next(); tok.typ {
  		case itemQuestionDotIdent:
  			nullsafe = 1
  			fallthrough
  		case itemDotIdent:
  			accessNode = &ast.DataRefKeyNode{tok.pos, nullsafe == 1, tok.val[nullsafe+1:]}
  		case itemQuestionDotIndex:
  			nullsafe = 1
  			fallthrough
  		case itemDotIndex:
  			index, err := strconv.ParseInt(tok.val[nullsafe+1:], 10, 0)
  			if err != nil {
  				t.error(err)
  			}
  			accessNode = &ast.DataRefIndexNode{tok.pos, nullsafe == 1, int(index)}
  		case itemQuestionKey:
  			nullsafe = 1
  			fallthrough
  		case itemLeftBracket:
  			accessNode = &ast.DataRefExprNode{tok.pos, nullsafe == 1, t.parseExpr(0)}
  			t.expect(itemRightBracket, "dataref")
  		default:
  			t.backup()
  			return ref
  		}
  		ref.Access = append(ref.Access, accessNode)
  	}
  }
docs: // DataRef ->  ( "$ij." Ident | "$ij?." Ident | DollarIdent )
  //             (   DotIdent | QuestionDotIdent | DotIndex | QuestionDotIndex
  //               | "[" Expr "]" | "?[" Expr "]" )*
  // TODO: Injected data