This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
arf/analyzer/primitives.go
Sasha Koshka b3e2d9f822 Progress on data structures for type sections
Type specifiers will now store a list of members, instead of
type sections doing that. This will make it possible to do an
inline object definition within a data section, = phrase, etc.

The parser will be reworked to include syntax that supports this,
objects and types will be merged into just a type section, and
face sections will have the added capability of defining function
pointer types.
2022-09-09 20:57:41 -04:00

25 lines
1.1 KiB
Go

package analyzer
// This is a global, cannonical list of primitive and built-in types.
var PrimitiveInt = TypeSection { sectionBase: sectionBase { name: "Int" } }
var PrimitiveUInt = TypeSection { sectionBase: sectionBase { name: "UInt" } }
var PrimitiveI8 = TypeSection { sectionBase: sectionBase { name: "I8 " } }
var PrimitiveI16 = TypeSection { sectionBase: sectionBase { name: "I16 " } }
var PrimitiveI32 = TypeSection { sectionBase: sectionBase { name: "I32 " } }
var PrimitiveI64 = TypeSection { sectionBase: sectionBase { name: "I64 " } }
var PrimitiveU8 = TypeSection { sectionBase: sectionBase { name: "U8 " } }
var PrimitiveU16 = TypeSection { sectionBase: sectionBase { name: "U16 " } }
var PrimitiveU32 = TypeSection { sectionBase: sectionBase { name: "U32 " } }
var PrimitiveU64 = TypeSection { sectionBase: sectionBase { name: "U64 " } }
var PrimitiveObjt = TypeSection { sectionBase: sectionBase { name: "Objt" } }
var PrimitiveFace = TypeSection { sectionBase: sectionBase { name: "Face" } }
var BuiltInString = TypeSection {
inherits: Type {
actual: PrimitiveU8,
kind: TypeKindVariableArray,
},
}