Skip to content
pannous edited this page Feb 20, 2023 · 5 revisions

Each node has one of the following internal types (called kind to distinguish it from the external object type) :

enum Type {
// plurals because of namespace clash
	// TODO add subtypes of Class:Node Variable:Node etc ^^^
	nils = 0,
	objects, // {…} block data with children closures
	groups, // (…) meta params parameter attributes lists
	patterns, // […] selectors matches, annotations! [public export extern] function mul(x,y){x*y}
	key, // key with value
	reference, // variable identifier name x
	symbol, // one / plus / Jesus
	operators, // or just symbol?
	expression, // one plus one
	declaration, // x:=1
	strings,
	codepoint1,
	arrays, // Node[] vs any[]? vs
	buffers, // int[]
	reals,
	longs, // the signature of parameters/variables is independent!
//	ints, // use longy field, but in wasm longs are pointers!
	bools,
	errors, // internal wasp error, NOT to be used in Angle!
	call,
	unknown = 20 //7
};// Type =>  must use 'enum' tag to refer to type 'Type' NAH!

Todo: can Type itself become a Node, making the distinction between type and kind superfluous?

Home

Philosophy

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally