Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request company-projects/Meadow!44
  • Loading branch information
zone117x committed Oct 7, 2018
2 parents f340d61 + 02d7bbe commit 9f32379
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
17 changes: 2 additions & 15 deletions src/Meadow.CoverageReport/Debugging/Variables/BaseVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public abstract class BaseVariable
public VarBase ValueParser { get; set; }
#endregion

#region Constructor
protected BaseVariable(AstVariableDeclaration declaration)
#region Functions
protected void Initialize(AstVariableDeclaration declaration)
{
// Set our properties
Declaration = declaration;
Expand All @@ -56,19 +56,6 @@ protected BaseVariable(AstVariableDeclaration declaration)
Initialize(Declaration.Name, Declaration.TypeName);
}

/// <summary>
/// Initializes the variable with a given declaration, parsing all relevant type information and associating the appropriate value parser.
/// </summary>
/// <param name="name">The name to use to describe the variable.</param>
/// <param name="astTypeName">The AST node which describes the type name for this variable.</param>
protected BaseVariable(string name, AstElementaryTypeName astTypeName)
{
// Initialize by name and type.
Initialize(name, astTypeName);
}
#endregion

#region Functions
protected void Initialize(string name, AstElementaryTypeName astTypeName)
{
// Set our properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ public override VarLocation VariableLocation
#endregion

#region Constructor
public LocalVariable(AstVariableDeclaration declaration, bool isFunctionParameter, int stackIndex, SourceMapEntry sourceMapEntry) : base(declaration)
public LocalVariable(AstVariableDeclaration declaration, bool isFunctionParameter, int stackIndex, SourceMapEntry sourceMapEntry)
{
// Set our extended properties
StackIndex = stackIndex;
SourceMapEntry = sourceMapEntry;
IsFunctionParameter = isFunctionParameter;

// Initialize by name and type.
Initialize(declaration);
}
#endregion

Expand Down
11 changes: 6 additions & 5 deletions src/Meadow.CoverageReport/Debugging/Variables/StateVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ public override VarLocation VariableLocation
#endregion

#region Constructor
public StateVariable(AstVariableDeclaration declaration) : base(declaration)
public StateVariable(AstVariableDeclaration declaration)
{
// Set our declaration
Declaration = declaration;
// Initialize by declaration
Initialize(declaration);
}

public StateVariable(string name, AstElementaryTypeName astTypeName) : base(name, astTypeName)
public StateVariable(string name, AstElementaryTypeName astTypeName)
{

// Initialize by name and type
Initialize(name, astTypeName);
}
#endregion
}
Expand Down

0 comments on commit 9f32379

Please sign in to comment.