Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rewrite stash handling
There are no more grafts, no more real concept of "stash paths", and
Foo::Bar really does define and use package Foo now.  As per jnthn's
design, non-packages can now replace packages in place, allowing
class Foo::Bar; class Foo to work again.  Things are generally
simpler; starting support for CORE:: and friends.
  • Loading branch information
sorear committed Jun 22, 2011
1 parent 365e216 commit 2c21c29
Show file tree
Hide file tree
Showing 13 changed files with 981 additions and 611 deletions.
1 change: 0 additions & 1 deletion TODO
Expand Up @@ -104,4 +104,3 @@ Other stuff to do after:
- jnthnian packages
- pm's = hack
- fix { my $x } crash
+ checking redeclaration of our symbols, methods, attributes...
17 changes: 17 additions & 0 deletions lib/Builtins.cs
Expand Up @@ -1213,6 +1213,23 @@ class SubstrLValue: Variable {
return File.Exists(path) || Directory.Exists(path);
}

static string[] split_on_colons(string path) {
List<string> l = new List<string>();
int ix = -2;
do {
int nix = path.IndexOf("::", ix+2);
l.Add(nix < 0 ? path.Substring(ix+2) :
path.Substring(ix+2, nix - (ix+2)));
ix = nix;
} while (ix >= 0);
return l.ToArray();
}

public static Variable dynamic_package_var(Frame th, string path) {
string[] toks = split_on_colons(path);
return null;
}

public static Variable BoxLoS(string[] los) {
VarDeque items = new VarDeque();
foreach (string i in los)
Expand Down

0 comments on commit 2c21c29

Please sign in to comment.