Browse files

Rename Qualifier into Namespace which is more explicit.

  • Loading branch information...
1 parent a8a1d5d commit 90f351c65f240735074bb8a6700ca1fdfe770e80 @deadalnix deadalnix committed Apr 18, 2012
Showing with 11 additions and 11 deletions.
  1. +1 −1 src/sdc/ast/expression2.d
  2. +6 −6 src/sdc/ast/identifier2.d
  3. +1 −1 src/sdc/ast/type2.d
  4. +3 −3 src/sdc/parser/identifier2.d
View
2 src/sdc/ast/expression2.d
@@ -4,7 +4,7 @@ import sdc.location;
import sdc.ast.identifier2;
import sdc.ast.statement2;
-class Expression : Statement, Qualifier {
+class Expression : Statement, Namespace {
this(Location location) {
super(location);
}
View
12 src/sdc/ast/identifier2.d
@@ -3,7 +3,7 @@ module sdc.ast.identifier2;
import sdc.location;
import sdc.ast.base : Node;
-class Identifier : Node, Qualifier {
+class Identifier : Node, Namespace {
private string name;
this(Location location, string name) {
@@ -16,27 +16,27 @@ class Identifier : Node, Qualifier {
/**
* Anything that can qualify an identifier
*/
-interface Qualifier {
+interface Namespace {
}
/**
* A qualified identifier (qualifier.identifier)
*/
class QualifiedIdentifier : Identifier {
- private Qualifier qualifier;
+ private Namespace namespace;
- this(Location location, string name, Qualifier qualifier) {
+ this(Location location, string name, Namespace namespace) {
super(location, name);
- this.qualifier = qualifier;
+ this.namespace = namespace;
}
}
/**
* Module qualifier (used for .identifier)
*/
-class ModuleQualifier : Node, Qualifier {
+class ModuleNamespace : Node, Namespace {
this(Location location) {
this.location = location;
}
View
2 src/sdc/ast/type2.d
@@ -5,7 +5,7 @@ import sdc.ast.base : Node;
import sdc.ast.expression2;
import sdc.ast.identifier2;
-class Type : Node, Qualifier {
+class Type : Node, Namespace {
this(Location location) {
this.location = location;
}
View
6 src/sdc/parser/identifier2.d
@@ -28,17 +28,17 @@ auto parseIdentifier(TokenStream tstream) {
* Parse dotted identifier (.identifier)
*/
auto parseDotIdentifier(TokenStream tstream, Location location) {
- return parseQualifiedIdentifier(tstream, location, new ModuleQualifier(location));
+ return parseQualifiedIdentifier(tstream, location, new ModuleNamespace(location));
}
/**
* Parse any qualifier identifier (qualifier.identifier)
*/
-auto parseQualifiedIdentifier(TokenStream tstream, Location location, Qualifier qualifier) {
+auto parseQualifiedIdentifier(TokenStream tstream, Location location, Namespace namespace) {
string name = match(tstream, TokenType.Identifier).value;
location.spanTo(tstream.previous.location);
- auto identifier = new QualifiedIdentifier(location, name, qualifier);
+ auto identifier = new QualifiedIdentifier(location, name, namespace);
while(tstream.peek.type == TokenType.Dot) {
name = match(tstream, TokenType.Identifier).value;

0 comments on commit 90f351c

Please sign in to comment.