Show / Hide Table of Contents

Class Parser

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

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

Methods

| Improve this Doc View Source

Parse(String)

Parses the dice expression spcified into an IDiceExpression instance.

Declaration
public IDiceExpression Parse(string expression)
Parameters
Type Name Description
System.String expression

The expression to parse.

Returns
Type Description
IDiceExpression

An IDiceExpression 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)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX