Table of Contents

Struct FieldInstructionToken

Namespace
DocWright.Core.Text
Assembly
DocWright.Core.dll

One token of a field instruction, with the quoting state it was written in.

public readonly struct FieldInstructionToken : IEquatable<FieldInstructionToken>
Implements
Inherited Members

Remarks

Quoting is not cosmetic: Word's IF comparison applies wildcard matching only to a quoted right-hand operand, and a quoted numeric operand still compares numerically. A tokenizer that discards quoting cannot express either rule, so it is carried here.

Constructors

FieldInstructionToken(string, bool)

Initializes a token.

Properties

Text

Gets the token text, with quotes removed and escapes resolved. Never null.

WasQuoted

Gets whether any part of the token was written inside quotes.

Methods

Equals(FieldInstructionToken)
Equals(object?)
GetHashCode()
ToString()

Operators

operator ==(FieldInstructionToken, FieldInstructionToken)

Compares two tokens for equality.

operator !=(FieldInstructionToken, FieldInstructionToken)

Compares two tokens for inequality.