Skip to content

Commit

Permalink
Use concrete types for builtin types
Browse files Browse the repository at this point in the history
  • Loading branch information
DQNEO committed Aug 23, 2023
1 parent 6c938dc commit af9dd95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,37 @@ const T_POINTER TypeKind = "T_POINTER"
const T_MAP TypeKind = "T_MAP"

// --- universal types ---
var Bool Type = &Basic{
var Bool = &Basic{
Knd: GBool,
name: "bool",
}

var Int Type = &Basic{
var Int = &Basic{
Knd: GInt,
name: "int",
}

// Rune
var Int32 Type = &Basic{
var Int32 = &Basic{
Knd: GInt32,
name: "int32",
}

var Uintptr Type = &Basic{
var Uintptr = &Basic{
Knd: GUintptr,
name: "uintptr",
}

var Uint8 Type = &Basic{
var Uint8 = &Basic{
Knd: GUint8,
name: "uint8",
}

var Uint16 Type = &Basic{
var Uint16 = &Basic{
Knd: GUint16,
name: "uint16",
}
var String Type = &Basic{
var String = &Basic{
Knd: GString,
name: "string",
}
Expand All @@ -73,8 +73,8 @@ var Error = &Named{
},
}

var EmptyInterface Type = &Interface{}
var GeneralSliceType Type = &Slice{}
var EmptyInterface = &Interface{}
var GeneralSliceType = &Slice{}

const GBool = 1
const GInt = 2
Expand Down

0 comments on commit af9dd95

Please sign in to comment.