pulumi/pkg
joeduffy 5aff453cc1 Add rudimentary symbol abstractions
This massages the symbol layer to reflect more closely what we need.

There is a Symbol interface.  It is an interface because it's polymorphic
and we'll need to switch on type tests throughout the code a fair bit.

In addition to the Symbol interface, there are three other interfaces:

* ModuleMember, for any Module member symbols.

* ClassMember, for any Class member symbols.

* Type, to permit polymorphic treatment of Classes and built-in types.

There are concrete symbols for Module, ModuleProperty, ModuleMethod,
Class, ClassProperty, and ClassMethod.  These map directly to the
corresponding AST abstractions and simply permit us to annotate those
AST nodes with some semantic information and, more importantly, to
inject them into the symbol table as we perform binding/typechecking.

Class implements the Type abstraction.

There is also a primitive node with four constant types, AnyType,
BoolType, NumberType, and StringType, each of which is registered in
an export Primitives map, keyed by their name/keyword/token.  These
of course implement the Type abstraction.

Finally, there are ArrayType and MapType symbols, which also implement
Type.  They wrap other types as keys/elements.

I'm peeling off this part from my gigantic pending change, since this is
mostly standalone, and ideally leads to more independent chunks.
2017-01-19 12:02:49 -08:00
..
cmdutil Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
compiler Add rudimentary symbol abstractions 2017-01-19 12:02:49 -08:00
config Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
diag Implement diag.Diagable on MuIL AST nodes 2017-01-17 18:01:11 -08:00
encoding Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
graph Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
pack Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
tokens Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
util Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00
workspace Begin overhauling semantic phases 2017-01-18 12:18:37 -08:00