Search in sources :

Example 1 with IOperator

use of dyvilx.tools.compiler.ast.expression.operator.IOperator in project Dyvil by Dyvil.

the class HeaderContext method putOperator.

private void putOperator(IOperator operator) {
    if (operator.getType() != IOperator.INFIX) {
        return;
    }
    final Name name = operator.getName();
    if (this.infixOperatorMap == null) {
        this.infixOperatorMap = new IdentityHashMap<>();
        this.infixOperatorMap.put(name, operator);
        return;
    }
    final IOperator existing = this.infixOperatorMap.get(name);
    if (existing == null) {
        this.infixOperatorMap.put(name, operator);
    }
}
Also used : IOperator(dyvilx.tools.compiler.ast.expression.operator.IOperator) Name(dyvil.lang.Name)

Aggregations

Name (dyvil.lang.Name)1 IOperator (dyvilx.tools.compiler.ast.expression.operator.IOperator)1