ref: de92a40b756cd06c31c70e77277ca270e8dae4d1
dir: /dat.h/
enum { TEOF = 1<<24, TDOUBLE, TPT2, TPT3, TVEC2, TVEC3, TNORMAL2, TNORMAL3, TQUAT, TMAT3, TMAT4, TNUM, TSTR, TPP, TMM, TEQ, TLAND, TLOR, TID, }; typedef struct Line Line; typedef struct Token Token; typedef struct Lexer Lexer; struct Line { char *file; ulong line; }; struct Token { int type; char *s; double v; }; struct Lexer { Biobuf *in; Line ln; Token tok; Token peektok; }; enum { NODENUM, NODESYM, }; enum { SYMVAR, SYMCONST, SYMTYPE, }; enum { TYPDOUBLE, TYPPOINT, TYPVECTOR, TYPNORMAL, TYPQUAT, TYPMAT3, TYPMAT4, }; typedef struct Keyword Keyword; typedef struct Type Type; typedef struct Const Const; typedef struct Var Var; typedef struct Symbol Symbol; typedef struct Node Node; struct Keyword { char *name; Rune tok; }; struct Type { int type; }; struct Const { char *name; double val; }; struct Var { int type; double val[4]; }; struct Symbol { char *name; int type; union { Var var; /* SYMVAR */ double cval; /* SYMCONST */ }; Symbol *next; }; struct Node { int type; double num; /* NODENUM */ Symbol *sym; /* NODESYM */ };