func newArgDirective(base *baseDirective, state *parsingState) (Directive, error) {
	if err := base.replaceVarsCurrStageOrGlobal(state); err != nil {
		return nil, err
	}
	if vars, err := parseKeyVals(base.Args); err == nil {
		if len(vars) != 1 {
			return nil, base.err(errNotExactlyOneArg)
		}
		var name string
		var defaultVal string
		for k, v := range vars {
			name = k
			defaultVal = v
		}
		return &ArgDirective{base, name, defaultVal, nil}, nil
	}
	args, err := splitArgs(base.Args, false)
	if err != nil {
		return nil, base.err(err)
	}
	if len(args) != 1 {
		return nil, base.err(errNotExactlyOneArg)
	}
	return &ArgDirective{base, base.Args, "", nil}, nil
}
Variables:
If we have not yet entered the first stage (encountered a FROM directive),
variables are replaced using other globally-defined ARGs.
Else, variables are replaced from ARGs and ENVs from within our stage.
Formats:
ARG <name>[=<default value>]
package dockerfile
type ArgDirective struct {
	*baseDirective
	Name        string
	DefaultVal  string
	ResolvedVal *string
}