forked from rubinius/rubinius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworked nodes related to defining classes.
ClassWrapper will probably be renamed to Class once all specs are passing an the old compiler is replaced. The idea is to have the AST represent the actual structure (eg using ClassName) rather than having aspects of the AST structure represented in conditional logic. Some logic is necessary to distinguish different structures at the top levels, but that logic is easy to follow because it results in concrete forms (at a lexical level) rather than resulting in different forms of output from running the code. This also enables better processing phases. For example, an EmptyClass can be processed by either form recognition (if node.kind_of? EmptyClass) or by adding methods to it rather that trying to inject logic into places that already do something like: if @body.empty? handle empty body end
- Loading branch information
Brian Ford
committed
Aug 7, 2009
1 parent
d9c3d98
commit d7636db
Showing
2 changed files
with
191 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters