Struct Token
Represents a character in a formula
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: OfficeOpenXml.FormulaParsing.LexicalAnalysis
Assembly: EPPlus.dll
Syntax
public struct Token
Constructors
Token(String, TokenType)
Constructor
Declaration
public Token(string token, TokenType tokenType)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | The formula character |
TokenType | tokenType | The TokenType |
Token(String, TokenType, Boolean)
Constructor
Declaration
public Token(string token, TokenType tokenType, bool isNegated)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | The formula character |
TokenType | tokenType | The TokenType |
System.Boolean | isNegated |
Fields
Value
The formula character
Declaration
public string Value
Field Value
Type | Description |
---|---|
System.String |
Properties
IsNegated
Indicates whether a numeric value should be negated when compiled
Declaration
public readonly bool IsNegated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TokenTypeIsAddress
Returns true if the token contains a address token that should be updated in insert/delete operations.
Declaration
public readonly bool TokenTypeIsAddress { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TokenTypeIsAddressToken
Returns true if the token is a token building an address.
Declaration
public readonly bool TokenTypeIsAddressToken { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AreEqualTo(Token)
Declaration
public bool AreEqualTo(Token otherToken)
Parameters
Type | Name | Description |
---|---|---|
Token | otherToken |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Overrides object.Equals with no behavioural change
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
GetHashCode()
Overrides object.GetHashCode with no behavioural change
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.ValueType.GetHashCode()
TokenTypeIsSet(TokenType)
Return if the supplied tokenType
is set on this token.
Declaration
public bool TokenTypeIsSet(TokenType tokenType)
Parameters
Type | Name | Description |
---|---|---|
TokenType | tokenType | The TokenType to check |
Returns
Type | Description |
---|---|
System.Boolean | True if the token is set, otherwirse false |
ToString()
Overrides object.ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | TokenType, followed by value |
Overrides
System.ValueType.ToString()
Operators
Equality(Token, Token)
Operator ==
Declaration
public static bool operator ==(Token t1, Token t2)
Parameters
Type | Name | Description |
---|---|---|
Token | t1 | |
Token | t2 |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(Token, Token)
Operator !=
Declaration
public static bool operator !=(Token t1, Token t2)
Parameters
Type | Name | Description |
---|---|---|
Token | t1 | |
Token | t2 |
Returns
Type | Description |
---|---|
System.Boolean |