File: type.go

package info (click to toggle)
miller 6.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 87,928 kB
  • sloc: ruby: 162; sh: 119; makefile: 87
file content (36 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package scan

// TODO: comment re context

type ScanType int

const (
	scanTypeString                ScanType = 0
	scanTypeDecimalInt            ScanType = 1
	scanTypeLeadingZeroDecimalInt ScanType = 2
	scanTypeOctalInt              ScanType = 3
	scanTypeLeadingZeroOctalInt   ScanType = 4
	scanTypeHexInt                ScanType = 5
	scanTypeBinaryInt             ScanType = 6
	scanTypeMaybeFloat            ScanType = 7
)

const typeNameString = "string"
const typeNameDecimalInt = "decint"              // e.g.       123
const typeNameLeadingZeroDecimalInt = "lzdecint" // e.g.       0899
const typeNameOctalInt = "octint"                // e.g.       0o377
const typeNameLeadingZeroOctalInt = "lzoctint"   // e.g.       0377
const typeNameHexInt = "hexint"                  // e.g.       0xcafe
const typeNameBinaryInt = "binint"               // e.g.       0b1011
const typeNameMaybeFloat = "float?"              // characters in     [0-9\.-+eE] but needs parse to be sure

var TypeNames = []string{
	typeNameString,
	typeNameDecimalInt,
	typeNameLeadingZeroDecimalInt,
	typeNameOctalInt,
	typeNameLeadingZeroOctalInt,
	typeNameHexInt,
	typeNameBinaryInt,
	typeNameMaybeFloat,
}