Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Enable Foo.Bar.Baz syntax for nested namespaces

  • Loading branch information...
commit 7583768dcdeb530f72cb8e9ab42ca3479ae747b5 1 parent 13b1371
Andrew Whitworth authored

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. +10 1 winxedst1.winxed
11 winxedst1.winxed
@@ -9842,6 +9842,15 @@ class NamespaceBase : VarContainer
9842 9842 var t = tk.get();
9843 9843 string name = t;
9844 9844 t = tk.get();
  9845 + var parent = self;
  9846 +
  9847 + if (t.isop('.')) {
  9848 + for ( ; t.isop('.'); t = tk.get()) {
  9849 + say("Declaring namespace " + string(name));
  9850 + parent = parent.childnamespace(name, string(name), null);
  9851 + name = tk.get();
  9852 + }
  9853 + }
9845 9854
9846 9855 var modifier;
9847 9856 if (t.isop('[')) {
@@ -9850,7 +9859,7 @@ class NamespaceBase : VarContainer
9850 9859 }
9851 9860
9852 9861 RequireOp('{', t);
9853   - var child = self.childnamespace(start, name, modifier);
  9862 + var child = parent.childnamespace(start, name, modifier);
9854 9863 child.parse(tk);
9855 9864 }
9856 9865 function parse(tk)

0 comments on commit 7583768

Please sign in to comment.
Something went wrong with that request. Please try again.