Answer architecture round 1: calls carry no operands in the grammar, ParseCalc returns its operands, one empty-segment check, sorted token kinds, and file items 110 and 111
This commit is contained in:
@@ -32,10 +32,8 @@ func RefShape(name string) (sigil, rest string, err error) {
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
for _, seg := range segs {
|
||||
if seg == "" {
|
||||
return "", "", fmt.Errorf("path has an empty segment")
|
||||
}
|
||||
if err := CheckSegments(segs); err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
return sigil, rest, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user