public static void AddFloatingTypeProperties(int TypeToken, ResolveResult rr, ICompletionDataGenerator cdg, INode relatedNode = null, bool DontAddInitProperty = false) { var intType = new DTokenDeclaration(TypeToken); if (!DontAddInitProperty) { var prop_Init = new DVariable() { Type = intType, Initializer = new PostfixExpression_Access() { PostfixForeExpression = new TokenExpression(TypeToken), TemplateOrIdentifier = new IdentifierDeclaration("nan") } }; if (relatedNode != null) { prop_Init.AssignFrom(relatedNode); } // Override the initializer variable's name and description prop_Init.Name = "init"; prop_Init.Description = "A type's or variable's static initializer expression"; cdg.Add(prop_Init); } CreateArtificialProperties(FloatingTypeProps, cdg, intType); }
public override void Visit(DTokenDeclaration td) { if (td.Token == DTokens.Incomplete && peek is TemplateInstanceExpression) { LastCallExpression = peek; } }
/// <summary> /// Adds init, max, min to the completion list /// </summary> public static void AddIntegralTypeProperties(int TypeToken, ResolveResult rr, ICompletionDataGenerator cdg, INode relatedNode = null, bool DontAddInitProperty = false) { var intType = new DTokenDeclaration(TypeToken); if (!DontAddInitProperty) { var prop_Init = new DVariable() { Type = intType, Initializer = new IdentifierExpression(0, LiteralFormat.Scalar) }; if (relatedNode != null) { prop_Init.AssignFrom(relatedNode); } // Override the initializer variable's name and description prop_Init.Name = "init"; prop_Init.Description = "A type's or variable's static initializer expression"; cdg.Add(prop_Init); } CreateArtificialProperties(IntegralProps, cdg, intType); }
public override void Visit(DTokenDeclaration td) { if (td.Token == DTokens.Incomplete) { if (handlesBaseClasses) { MemberFilter vis; if (handledClass.ClassType == DTokens.Interface) { vis = MemberFilter.Interfaces | MemberFilter.Templates; } else { vis = MemberFilter.Classes | MemberFilter.Interfaces | MemberFilter.Templates; } prv = new CtrlSpaceCompletionProvider(cdgen, handledClass, vis | MemberFilter.BlockKeywords); } else if (td.InnerDeclaration != null) { prv = new MemberCompletionProvider(cdgen, td.InnerDeclaration, scopedBlock); } else { prv = new CtrlSpaceCompletionProvider(cdgen, scopedBlock, ShownKeywords); } halt = true; } else { base.Visit(td); } }
static bool HandleDecl(DTokenDeclaration tk, AbstractType r) { if (r is PrimitiveType) { return(ResultComparer.IsPrimitiveTypeImplicitlyConvertible(((PrimitiveType)r).TypeToken, tk.Token)); } return(false); }
static bool HandleDecl(DTokenDeclaration tk, AbstractType r) { if (r is PrimitiveType) { return(tk.Token == ((PrimitiveType)r).TypeToken); } return(false); }
public static PrimitiveType Resolve(DTokenDeclaration token) { var tk = (token as DTokenDeclaration).Token; if (DTokens.BasicTypes[tk]) return new PrimitiveType(tk, 0, token); return null; }
public static PrimitiveType Resolve(DTokenDeclaration token) { var tk = (token as DTokenDeclaration).Token; if (DTokens.IsBasicType(tk)) { return(new PrimitiveType(tk, 0, token)); } return(null); }
public virtual void Visit(DTokenDeclaration td) { VisitInner(td); }
void IfCondition(IfStatement par) { var wkType = AllowWeakTypeParsing; AllowWeakTypeParsing = true; Lexer.PushLookAheadBackup(); ITypeDeclaration tp; if (laKind == Auto) { Step(); tp = new DTokenDeclaration(Auto) { Location=t.Location, EndLocation=t.EndLocation }; } else tp = Type(); AllowWeakTypeParsing = wkType; if (tp != null && laKind == Identifier) { var dv = Declarator(tp, false, par.ParentNode) as DVariable; if (dv == null) { SynErr(t.Kind, "Invalid node type! - Variable expected!"); return; } if (laKind == Assign) { Step (); dv.Location = tp.Location; dv.Initializer = Expression(); dv.EndLocation = t.EndLocation; par.IfVariable = dv; return; } } if (IsEOF && tp != null && !(tp is IdentifierDeclaration || tp is DTokenDeclaration && (tp as DTokenDeclaration).Token == DTokens.INVALID)) { /* * Ambigious situation: if(e| -- is this an inline declaration or the start of a postfix_access expression á la 'e.'? */ TrackerVariables.ExpectingNodeName = true; } else { Lexer.RestoreLookAheadBackup(); par.IfCondition = Expression(); } }
public ulong Visit(DTokenDeclaration dTokenDeclaration) { return(1001549); }
static bool HandleDecl(DTokenDeclaration tk, AbstractType r) { if (r is PrimitiveType) return tk.Token == ((PrimitiveType)r).TypeToken; return false; }