code: func (p *Parser) Parse() (*ast.File, error) {
  	f := &ast.File{}
  	var err, scerr error
  	p.sc.Error = func(pos token.Pos, msg string) {
  		scerr = fmt.Errorf("%s: %s", pos, msg)
  	}
  
  	// The root must be an object in JSON
  	object, err := p.object()
  	if scerr != nil {
  		return nil, scerr
  	}
  	if err != nil {
  		return nil, err
  	}
  
  	// We make our final node an object list so it is more HCL compatible
  	f.Node = object.List
  
  	// Flatten it, which finds patterns and turns them into more HCL-like
  	// AST trees.
  	flattenObjects(f.Node)
  
  	return f, nil
  }
docs: // Parse returns the fully parsed source and returns the abstract syntax tree.