Skip to content

Commit

Permalink
Use the property attribute on a per-function basis.
Browse files Browse the repository at this point in the history
Also remove the unnecessary and faulty getter of autoImportFilter.
  • Loading branch information
Mitten-O committed Nov 8, 2015
1 parent 2402025 commit 582f71b
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions dstep/translator/IncludeHandler.d
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,24 @@ class IncludeHandler
imports ~= "core.stdc.config";
}

@property{
/// Makes includes that match regex filter be converted to import with prefix.
void autoImportPrefix (string prefix)
{
this.convertIncludes = true;
this.importPrefix = prefix;
}

string autoImportPrefix ()
{
return this.importPrefix;
}
/// Makes includes that match regex filter be converted to import with prefix.
@property void autoImportPrefix (string prefix)
{
this.convertIncludes = true;
this.importPrefix = prefix;
}

/// Makes includes that match regex filter be converted to import with prefix.
void autoImportFilter (string filter)
{
this.convertIncludes = true;
this.convertableIncludePattern = regex(filter);
}
@property string autoImportPrefix ()
{
return this.importPrefix;
}

string autoImportFilter()
{
return this.convertableIncludePattern.stringof;
}
/// Makes includes that match regex filter be converted to import with prefix.
@property void autoImportFilter (string filter)
{
this.convertIncludes = true;
this.convertableIncludePattern = regex(filter);
}

string[] toImports ()
Expand Down

0 comments on commit 582f71b

Please sign in to comment.