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.
This commit is contained in:
2022-09-09 20:55:03 -04:00
parent cc8ae6c124
commit b3e2d9f822
5 changed files with 129 additions and 73 deletions

View File

@@ -2,19 +2,19 @@ package analyzer
// This is a global, cannonical list of primitive and built-in types.
var PrimitiveInt = TypeSection { name: "Int" }
var PrimitiveUInt = TypeSection { name: "UInt" }
var PrimitiveI8 = TypeSection { name: "I8" }
var PrimitiveI16 = TypeSection { name: "I16" }
var PrimitiveI32 = TypeSection { name: "I32" }
var PrimitiveI64 = TypeSection { name: "I64" }
var PrimitiveU8 = TypeSection { name: "U8" }
var PrimitiveU16 = TypeSection { name: "U16" }
var PrimitiveU32 = TypeSection { name: "U32" }
var PrimitiveU64 = TypeSection { name: "U64" }
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 { name: "Objt" }
var PrimitiveFace = TypeSection { name: "Face" }
var PrimitiveObjt = TypeSection { sectionBase: sectionBase { name: "Objt" } }
var PrimitiveFace = TypeSection { sectionBase: sectionBase { name: "Face" } }
var BuiltInString = TypeSection {
inherits: Type {