Search in sources :

Example 31 with IMethod

use of dyvilx.tools.compiler.ast.method.IMethod in project Dyvil by Dyvil.

the class REPLContext method getMethodMatches.

@Override
public void getMethodMatches(MatchList<IMethod> list, IValue receiver, Name name, ArgumentList arguments) {
    for (IMethod method : this.methods) {
        method.checkMatch(list, receiver, name, arguments);
    }
    if (name == null) {
        return;
    }
    final Name removeEq = Util.removeEq(name);
    IProperty property = this.properties.get(removeEq);
    if (property != null) {
        property.checkMatch(list, receiver, name, arguments);
    }
    final IField field = this.fields.get(removeEq);
    if (field != null) {
        property = field.getProperty();
        if (property != null) {
            property.checkMatch(list, receiver, name, arguments);
        }
    }
}
Also used : IProperty(dyvilx.tools.compiler.ast.field.IProperty) IMethod(dyvilx.tools.compiler.ast.method.IMethod) IField(dyvilx.tools.compiler.ast.field.IField) Name(dyvil.lang.Name)

Aggregations

IMethod (dyvilx.tools.compiler.ast.method.IMethod)31 IValue (dyvilx.tools.compiler.ast.expression.IValue)6 IField (dyvilx.tools.compiler.ast.field.IField)4 IProperty (dyvilx.tools.compiler.ast.field.IProperty)4 IType (dyvilx.tools.compiler.ast.type.IType)3 TreeSet (dyvil.collection.mutable.TreeSet)2 Name (dyvil.lang.Name)2 SourcePosition (dyvil.source.position.SourcePosition)2 IContext (dyvilx.tools.compiler.ast.context.IContext)2 FieldAccess (dyvilx.tools.compiler.ast.expression.access.FieldAccess)2 IImportContext (dyvilx.tools.compiler.ast.imports.IImportContext)2 ImportDeclaration (dyvilx.tools.compiler.ast.imports.ImportDeclaration)2 MatchList (dyvilx.tools.compiler.ast.method.MatchList)2 IParameter (dyvilx.tools.compiler.ast.parameter.IParameter)2 PrintStream (java.io.PrintStream)2 ClassBody (dyvilx.tools.compiler.ast.classes.ClassBody)1 IClass (dyvilx.tools.compiler.ast.classes.IClass)1 IConstructor (dyvilx.tools.compiler.ast.constructor.IConstructor)1 CombiningContext (dyvilx.tools.compiler.ast.context.CombiningContext)1 IImplicitContext (dyvilx.tools.compiler.ast.context.IImplicitContext)1