Esempio n. 1
0
        private BindingPower PeekBindingPower()
        {
            if (!_infixParslets.ContainsKey(_peekToken.Type))
            {
                return(BindingPower.LOWEST);
            }

            IInfixParslet parslet = _infixParslets[_peekToken.Type];

            return(parslet.GetBindingPower());
        }
Esempio n. 2
0
 private void RegisterInfix(TokenType tokenType, IInfixParslet parslet)
 {
     _infixParslets.Add(tokenType, parslet);
 }
Esempio n. 3
0
    public Grammar RegisterInfix(ExpressionKind kind, IInfixParslet <ValueNode> parslet)
    {
        infixParslets.Add(kind, parslet);

        return(this);
    }