Search in sources :

Example 6 with Pattern

use of dyvilx.tools.compiler.ast.pattern.Pattern in project Dyvil by Dyvil.

the class BinaryPattern method withType.

@Override
public Pattern withType(IType type, MarkerList markers) {
    final Pattern left = this.left.withType(type, markers);
    if (left == null) {
        return null;
    }
    final Pattern right = this.right.withType(type, markers);
    if (right == null) {
        return null;
    }
    this.left = left;
    this.right = right;
    return this.withType();
}
Also used : Pattern(dyvilx.tools.compiler.ast.pattern.Pattern)

Aggregations

Pattern (dyvilx.tools.compiler.ast.pattern.Pattern)6 IType (dyvilx.tools.compiler.ast.type.IType)3 Marker (dyvilx.tools.parsing.marker.Marker)3 AbstractPattern (dyvilx.tools.compiler.ast.pattern.AbstractPattern)2 HashSet (dyvil.collection.mutable.HashSet)1 Label (dyvilx.tools.asm.Label)1 IClass (dyvilx.tools.compiler.ast.classes.IClass)1 TypeParameterList (dyvilx.tools.compiler.ast.generic.TypeParameterList)1 TypeCheckPattern (dyvilx.tools.compiler.ast.pattern.TypeCheckPattern)1 TypeList (dyvilx.tools.compiler.ast.type.TypeList)1 TupleType (dyvilx.tools.compiler.ast.type.compound.TupleType)1