1 write to TokenType
NuGet.Packaging (1)
Licenses\LicenseExpressionToken.cs (1)
27
TokenType
= tokenType;
16 references to TokenType
NuGet.Packaging (16)
Licenses\LicenseExpressionToken.cs (1)
32
return $"Value: {Value}, Type: {
TokenType
}";
Licenses\NuGetLicenseExpressionParser.cs (15)
44
var currentTokenType = token.
TokenType
;
45
switch (token.
TokenType
)
48
if (!firstPass && !token.
TokenType
.IsValidPrecedingToken(lastTokenType))
57
if (!firstPass && !token.
TokenType
.IsValidPrecedingToken(lastTokenType))
65
if (firstPass || !token.
TokenType
.IsValidPrecedingToken(lastTokenType))
71
while (operatorStack.Count > 0 && operatorStack.Peek().
TokenType
!= LicenseTokenType.OPENING_BRACKET)
90
if (firstPass && !token.
TokenType
.IsValidPrecedingToken(lastTokenType))
95
operatorStack.Peek().
TokenType
== LicenseTokenType.OPENING_BRACKET || // The last token is an opening bracket (treat it the same as empty
96
token.
TokenType
< operatorStack.Peek().
TokenType
) // An operator that has higher priority than the operator on the stack
101
else if (token.
TokenType
>= operatorStack.Peek().
TokenType
)
117
if (operatorStack.Peek().
TokenType
!= LicenseTokenType.OPENING_BRACKET)
171
if (op.
TokenType
== LicenseTokenType.WITH)
187
var logicalOperator = op.
TokenType
== LicenseTokenType.AND ? LogicalOperatorType.And : LogicalOperatorType.Or;