예제 #1
0
        private Expression ParsePrefixOperator(ExpressionToken token)
        {
            var right = Parse(5);

            return(CreatePrefixOperator(token, right));
        }
예제 #2
0
        private int GetAssociativePrecedence(ExpressionToken token)
        {
            OperatorPrecedence precedence;

            return(_precedences.TryGetValue(token.Text, out precedence) ? precedence.AssociativeValue : 0);
        }
예제 #3
0
 public ExpressionParseException(ExpressionToken token) : base(string.Format("Failed to parse expression at {0} ({1})", token.Text, token.Location))
 {
     Token = token;
 }