Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
@@ -67,7 +67,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
|
||||
fmt.Fprintln(stderr, "read stdin:", err)
|
||||
return 2
|
||||
}
|
||||
tree, err := interpres.Parse(data)
|
||||
tree, err := interpres.ParseMap(data)
|
||||
if err != nil {
|
||||
fmt.Fprintln(stderr, err)
|
||||
return 1
|
||||
@@ -108,7 +108,7 @@ func validatePaths(paths []string, stdin io.Reader, stderr io.Writer) int {
|
||||
fmt.Fprintf(stderr, "interpres-decode: %s: %v\n", name, err)
|
||||
return 2
|
||||
}
|
||||
if _, err := interpres.Parse(data); err != nil {
|
||||
if _, err := interpres.ParseMap(data); err != nil {
|
||||
fmt.Fprintf(stderr, "%s: %v\n", name, err)
|
||||
valid = false
|
||||
}
|
||||
@@ -262,7 +262,7 @@ func decodeTagged(typ, val string) (any, error) {
|
||||
// parser and requiring the result to hold exactly that one statement, so a
|
||||
// value carrying a newline or a comment cannot smuggle a second one in.
|
||||
func parseAtom(val string) (any, error) {
|
||||
tree, err := interpres.Parse([]byte("v = " + val + "\n"))
|
||||
tree, err := interpres.ParseMap([]byte("v = " + val + "\n"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user