-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added extension project which can format structured text.
- Loading branch information
Showing
12 changed files
with
955 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
namespace TcBlack | ||
{ | ||
public struct TcDeclaration | ||
{ | ||
public TcDeclaration( | ||
string name, | ||
string allocation, | ||
string dataType, | ||
string initialization, | ||
string comment | ||
) | ||
{ | ||
Name = name; | ||
Allocation = allocation; | ||
DataType = dataType; | ||
Initialization = initialization; | ||
Comment = comment; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
if (obj == null || GetType() != obj.GetType()) | ||
{ | ||
return false; | ||
} | ||
|
||
var other = (TcDeclaration)obj; | ||
return | ||
Name == other.Name | ||
&& Allocation == other.Allocation | ||
&& DataType == other.DataType | ||
&& Initialization == other.Initialization | ||
&& Comment == other.Comment | ||
; | ||
} | ||
|
||
public static bool operator==(TcDeclaration obj1, TcDeclaration obj2) | ||
{ | ||
if (obj1 == null) | ||
{ | ||
return obj2 == null; | ||
} | ||
|
||
return obj1.Equals(obj2); | ||
} | ||
|
||
public static bool operator !=(TcDeclaration obj1, TcDeclaration obj2) | ||
{ | ||
return !(obj1 == obj2); | ||
} | ||
|
||
public string Name { get; } | ||
public string Allocation { get; } | ||
public string DataType { get; } | ||
public string Initialization { get; } | ||
public string Comment { get; } | ||
} | ||
} |
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
Oops, something went wrong.