Skip to content

Commit

Permalink
Add comments, fix a namespace (ForNeVeR#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Jan 6, 2020
1 parent fbcf311 commit 3940d1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/WpfMath/Parsers/AtomAppendMode.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
namespace WpfMath
namespace WpfMath.Parsers
{
/// <summary>An enumeration that describes how an atom generated by a command should be handled.</summary>
internal enum AtomAppendMode
{
/// <summary>A new atom will be added to the end of the current formula.</summary>
Add,

/// <summary>A new atom will replace an entire existing formula.</summary>
/// <remarks>Useful for commands that wrap or somehow process the existing formula.</remarks>
Replace
}
}
4 changes: 4 additions & 0 deletions src/WpfMath/Parsers/CommandParsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ internal class CommandProcessingResult
/// </summary>
public int NextPosition { get; }

/// <summary>
/// Controls how an atom generated by this command should be handled: should it be added to the end of an
/// existing formula, or should it replace the formula completely.
/// </summary>
public AtomAppendMode AppendMode { get; }

public CommandProcessingResult(Atom atom, int nextPosition, AtomAppendMode appendMode = AtomAppendMode.Add)
Expand Down

0 comments on commit 3940d1c

Please sign in to comment.