mirror of
https://github.com/golang/go
synced 2024-10-04 12:31:21 -06:00
45ca9f7a9e
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev https://golang.org/cl/180050
14 lines
386 B
Go
14 lines
386 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package unicode
|
|
|
|
// IsDigit reports whether the rune is a decimal digit.
|
|
func IsDigit(rune int) bool {
|
|
if rune < 0x100 { // quick ASCII (Latin-1, really) check
|
|
return '0' <= rune && rune <= '9'
|
|
}
|
|
return Is(Digit, rune)
|
|
}
|