public static ResolveResult Value(object value, NProject compiler) { if (value == null) { return(Null()); } return(new ConstantResolveResult(compiler.Compilation.FindType(value.GetType()), value)); }
public static bool IsAutomatic(this IEvent ev, NProject project) { var decl = NProjectExtensions.GetDeclaration(ev.AddAccessor); return(decl == null); //if (decl != null) // return decl is EventDeclaration; //manual events return 'Accessor' type in declaration //throw new NotImplementedException(); }
public static ResolveResult GetParent(this ResolveResult res, NProject project) { var node = res.GetFirstNode(); if (node == null) { return(null); } var parent = node.Parent; if (parent == null) { return(null); } return(parent.Resolve()); }
public static IType BooleanType(NProject compiler) { return(compiler.Compilation.FindType(KnownTypeCode.Boolean)); }
public static IType CharType(NProject compiler) { return(compiler.Compilation.FindType(KnownTypeCode.Char)); }
public static OperatorResolveResult NotEqual(this ResolveResult left, ResolveResult right, NProject compiler) { return(left.Binary(System.Linq.Expressions.ExpressionType.NotEqual, right, BooleanType(compiler))); }
public static bool IsGenerated(this IEntity me, NProject project) { return(me.IsCompilerGenerated()); //throw new NotImplementedException(); }