package eval

import 

// SplitSigil splits any leading sigil from a qualified variable name.
func ( string) ( string,  string) {
	if  == "" {
		return "", ""
	}
	switch [0] {
	case '@':
		// TODO(xiaq): Support % later.
		return [:1], [1:]
	default:
		return "", 
	}
}

// SplitQName splits a qualified name into the first namespace segment and the
// rest.
func ( string) (,  string) {
	 := strings.IndexByte(, ':')
	if  == -1 {
		return , ""
	}
	return [:+1], [+1:]
}

// SplitQNameSegs splits a qualified name into namespace segments.
func ( string) []string {
	 := strings.SplitAfter(, ":")
	if len() > 0 && [len()-1] == "" {
		 = [:len()-1]
	}
	return 
}

// SplitIncompleteQNameNs splits an incomplete qualified variable name into the
// namespace part and the name part.
func ( string) (,  string) {
	 := strings.LastIndexByte(, ':')
	// If colon is -1, colon+1 will be 0, rendering an empty ns.
	return [:+1], [+1:]
}