mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-26 17:04:40 -04:00
refactor(go4k): Rename DeserializeAsm & SerializeAsm to ParseAsm & FormatAsm
Following the naming in strconv.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user