Rename grammar's NameRead to PathRead and CheckName to CheckIdentifier, so a name in the engine is only a bound name

This commit is contained in:
2026-10-07 02:09:52 +02:00
committed by Lillem4n
parent 097fae4cd2
commit fcec9c4a2a
20 changed files with 55 additions and 55 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ func isJSONStart(arg string) bool {
// pathAdvice refuses a spelling of path, naming path to write, or why no name can spell it.
func pathAdvice(path, refusal string) error {
if err := CheckPathNames(path); err != nil {
if err := CheckPathIdentifiers(path); err != nil {
return err
}
return fmt.Errorf("%s; write %s", refusal, path)
@@ -71,7 +71,7 @@ func loneReference(arg string) (string, bool) {
// loneRef is the reference a format of one reference token and nothing else reads.
func loneRef(toks []Token) (string, bool) {
if len(toks) != 1 || toks[0].Kind != NameRead || len(toks[0].Arms) != 1 || !IsRef(toks[0].Arms[0]) {
if len(toks) != 1 || toks[0].Kind != PathRead || len(toks[0].Arms) != 1 || !IsRef(toks[0].Arms[0]) {
return "", false
}
return toks[0].Arms[0], true