Show / Hide Table of Contents

Class Parser

Default class for parsing a string representing a dice expression into a DiceExpression instance.

Inheritance
object
Parser
Implements
IParser
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.DiceNotation
Assembly: GoRogue.dll
Syntax
public class Parser : IParser

Constructors

View Source

Parser()

Declaration
public Parser()

Methods

View Source

Parse(string)

Parses the dice expression specified into a DiceExpression instance.

Declaration
public DiceExpression Parse(string expression)
Parameters
Type Name Description
string expression

The expression to parse.

Returns
Type Description
DiceExpression

An DiceExpression representing the given expression, that can "roll" the expression on command.

Remarks

Breaks the dice expression into postfix form, and evaluates the postfix expression to the degree necessary to produce the appropriate chain of ITerm instances.

Implements

IParser

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX