First cut of a type checker.

This commit is contained in:
Nigel Tao committed 2017-05-06 16:55:17 +10:00
1 parent 6424985f0f
commit f744089e9c
3 files changed
+373 -15

No files matched your search

+4 -2
View File
@@ -34,8 +34,8 @@ const (
// For associative operators, ID0 is the operator and List0 holds the
// operands.
//
// The ID0 operator is in disambiguous form. For example, IDUnaryPlus,
// IDBinaryPlus or IDAssociativePlus, not a bare IDPlus.
// The ID0 operator is in disambiguous form. For example, IDXUnaryPlus,
// IDXBinaryPlus or IDXAssociativePlus, not a bare IDPlus.
//
// For function calls, like "LHS(List0)", ID0 is IDOpenParen.
//
@@ -161,6 +161,8 @@ type Node struct {
Kind Kind
Flags Flags
Type *Node
Filename string
Line uint32