refactor(go4k): Rename DeserializeAsm & SerializeAsm to ParseAsm & FormatAsm

Following the naming in strconv.
This commit is contained in:
Veikko Sariola
2020-12-07 11:14:46 +02:00
parent c75e54212b
commit fee637b02a
3 changed files with 10 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import (
"strings"
)
func DeserializeAsm(asmcode string) (*Song, error) {
func ParseAsm(asmcode string) (*Song, error) {
paramReg, err := regexp.Compile(`(?:([a-zA-Z]\w*)\s*\(\s*([0-9]+)\s*\)|([0-9]+))`) // matches FOO(42), groups "FOO" and "42" OR just numbers
if err != nil {
return nil, fmt.Errorf("error compiling paramReg: %v", err)
@ -89,7 +89,7 @@ func DeserializeAsm(asmcode string) (*Song, error) {
return &song, nil
}
func SerializeAsm(song *Song) (string, error) {
func FormatAsm(song *Song) (string, error) {
paramorder := map[string][]string{
"add": []string{"stereo"},
"addp": []string{"stereo"},
@ -280,7 +280,7 @@ func SerializeAsm(song *Song) (string, error) {
return ret, nil
}
func ExportCHeader(song *Song, maxSamples int) string {
func CHeader(song *Song, maxSamples int) string {
template :=
`// auto-generated by Sointu, editing not recommended
#ifndef SU_RENDER_H