On Wed, Oct 7, 2020 at 9:23 AM Ryan Keppel <
ryan.k...@gmail.com> wrote:
> In the current Golang
The name is Go. There's no Golang programming language.
> implementation of scanning, there's some extra code to handle ".." in the source (as two dot tokens).
Do you mean this?
https://golang.org/src/go/scanner/scanner.go#L837
> Would this ever happen in practice?
Sure, why not? Scanner will happily scan two consecutive dot tokens,
that's its job.
> Two floats together?
No. This seems to conflate what a scanner is for with the grammar of
the language. Package scanner can handle sources like `for package if
not break ..123..` just fine. The language specification not so much.
But in Go, as in many other languages, the lexical and syntax grammars
are two different things, even though the latter builds upon the
former.