public override bool IsSameType(MathObject other, IDictionary <string, MathObject> parameters) { return(other switch { MathSequence seq => IsSameType_Sequence(seq, parameters), MathToken token => IsSameType_Token(token, parameters), _ => false, });
public MathSequence(MathToken token, Token leftBracket, Token rightBracket) : this(token) { LeftBracket = leftBracket; RightBracket = rightBracket; _toTokenString = ConstructorHelperBracket(leftBracket, Main, rightBracket); _toString = _toTokenString.ToString(); OriginalText = _toTokenString.ToOriginalString().Trim(); }
private MathSequence(MathToken token) { List = new ReadOnlyCollection <MathObject>(new[] { token }); Main = token.ToTokenString(); Separator = ""; _toTokenString = Main; _toString = _toTokenString.ToString(); OriginalText = token.OriginalText; }
public MathSequence(MathToken token, Token supOrSub, Token left, MathObject math, Token right) : this(token) { if (supOrSub.Value == "^") { Sup = math; _supFirst = true; } else { Sub = math; } _toTokenString = ConstructorHelperSupSub(_toTokenString, supOrSub, left, math.ToTokenString(), right); _toString = _toTokenString.ToString(); OriginalText = _toTokenString.ToOriginalString().Trim(); }