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
+3 -3
View File
@@ -66,7 +66,7 @@ type Token struct {
Body string // the braces' content, as written
Fn string // BuiltinCall
Args []string // BuiltinCall
Arms []string // NameRead: the '|' alternatives
Arms []string // PathRead: the '|' alternatives
// NameBind: the reference it binds, and the name.
BoundRef, Bound string
}
@@ -77,7 +77,7 @@ const (
BuiltinCall TokenKind = iota + 1
LiteralRun
NameBind
NameRead
PathRead
)
const AsWord = " as "
@@ -104,7 +104,7 @@ func ParseFormat(format string) ([]Token, error) {
return nil
}
if indexOutside(u.body, '(') < 0 {
toks = append(toks, Token{Kind: NameRead, Body: u.body, Arms: splitOutside(u.body, '|')})
toks = append(toks, Token{Kind: PathRead, Body: u.body, Arms: splitOutside(u.body, '|')})
return nil
}
name, args, ok := FuncCall(u.body)