Rename Any -> A

pull/53/head
rwxrob 2 years ago
parent c6460984ce
commit 951c1ca048
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77

@ -141,8 +141,8 @@ type C struct {
This any
}
// Any is short for is.C{tk.ANY}.
type Any struct {
// A is short for is.C{tk.ANY}. (Mnemonic: "any", "asterisk")
type A struct {
N int
}

@ -455,7 +455,7 @@ func (s *R) Expect(expr any) (*Cur, error) {
}
return m, nil
case z.Any: // ----------------------------------------------------
case z.A: // ----------------------------------------------------
for n := 0; n < v.N; n++ {
s.Scan()
}

@ -398,7 +398,7 @@ func ExampleExpect_token_ANY() {
func ExampleExpect_any_Success() {
s, _ := scan.New("some thing")
c, _ := s.Expect(z.Any{5})
c, _ := s.Expect(z.A{5})
c.Print() // same as "some "
s.Print() // advanced to next after ('t')
// Output:

Loading…
Cancel
Save