Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added class variable assignment & small fixed to identifier ast node …
…class.
- Loading branch information
Showing
4 changed files
with
13 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
def class Person { | ||
@@a_classvar = "foo" | ||
def initialize: name { | ||
@name = name | ||
} | ||
|
||
def to_s { | ||
"Person with name: " ++ @name | ||
} | ||
|
||
def Person class_var { | ||
@@a_classvar | ||
} | ||
} | ||
|
||
p = Person new: "Christopher" | ||
p println | ||
Person class_var println |
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