/// <summary> /// Instantiates a new BinaryOperatorAttribute /// </summary> /// <param name="instanceName">Registry name of token</param> /// <param name="nodeType"> /// Type of node to create when parsing. Must inherit from /// NodeOperatorBinary. /// </param> /// <param name="precedence">Precedence level of operator.</param> public BinaryOperatorAttribute(string instanceName, Type nodeType, Precedence precedence) : base() { TokenInstance = TokenTypeRegistry.Get(instanceName); NodeType = nodeType; PrecedenceLevel = precedence; IsRightAssociative = false; }
/// <summary> /// Instantiates a new PostfixOperatorAttribute /// </summary> /// <param name="instanceName">Registry name of token</param> /// <param name="nodeType"> /// Type of node to create. Must inherit from /// NodeOperatorUnary. /// </param> public PostfixOperatorAttribute(string instanceName, Type nodeType) : base() { TokenInstance = TokenTypeRegistry.Get(instanceName); NodeType = nodeType; }