Skip to content

Conversation

@MinyazevR
Copy link
Owner

No description provided.

public class ParsingTree
{
/// <summary>
/// abstract nested class for dividing node into operators and operands for building a parse tree

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Везде с заглавной, а тут со строчной, неконсистентно

/// <summary>
/// A class representing operands
/// </summary>
public class Operand : Node

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operand не должен быть по идее вложенным в Node, потому что а зачем :) Пусть он будет вложенным в ParsingTree

Comment on lines 26 to 27
private readonly string Value;
public Operand(string element)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private readonly string Value;
public Operand(string element)
private readonly string Value;
public Operand(string element)

Comment on lines 33 to 36
public override float Count()
{
return float.Parse(Value);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public override float Count()
{
return float.Parse(Value);
}
public override float Count()
=> float.Parse(Value);

Value = element;
}

// The operand class calculates the value for them and returns it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Комментарии с // используются только для комментариев внутри методов, тут бы ///
Но можно /// <inheritdoc /> — что комментарий наследуется от предка

Comment on lines 7 to 9
{

/// <summary>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{
/// <summary>
{
/// <summary>

/// <summary>
/// Parse Tree Interface
/// </summary>
public interface IParsingTree

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Он у Вас нигде не используется, следовательно не нужен

Comment on lines 6 to 9
using System;


/// <summary>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using System;
/// <summary>
using System;
/// <summary>

/// <summary>
/// A class for testing a parsing tree
/// </summary>
public class TestsrsingTree

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что-то опечатка

/// </summary>
public class TestsrsingTree
{
ParsingTree tree = new();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants