void HandleVisitorFixedFieldDeclarationVisited (FixedFieldDeclaration node, InspectionData data) { foreach (var rule in policy.Rules) { if (rule.CheckField (node, data)) return; } }
public virtual void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { if (this.ThrowException) { throw (System.Exception) this.CreateException(fixedFieldDeclaration); } }
public virtual void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { if (ThrowException) { throw (Exception)CreateException(fixedFieldDeclaration); } }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { if (fixedFieldDeclaration.HasModifier(Modifiers.Static)) { CheckDependency(fixedFieldDeclaration.ReturnType); base.VisitFixedFieldDeclaration(fixedFieldDeclaration); } }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { fixedFieldDeclaration.ReturnType.AcceptVisitor(this); foreach (var init in fixedFieldDeclaration.Variables) { Colorize(init.NameToken, fieldDeclarationColor); init.CountExpression.AcceptVisitor(this); } }
void HandleVisitorFixedFieldDeclarationVisited(FixedFieldDeclaration node, InspectionData data) { foreach (var rule in policy.Rules) { if (rule.CheckField(node, data)) { return; } } }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { base.VisitFixedFieldDeclaration(fixedFieldDeclaration); var entity = AffectedEntity.Field; if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) { entity = AffectedEntity.ConstantField; } else if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) { entity = AffectedEntity.ReadonlyField; } CheckName(fixedFieldDeclaration, entity, fixedFieldDeclaration.NameToken, GetAccessibiltiy(fixedFieldDeclaration, Modifiers.Private)); }
public virtual void VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration) { VisitChildren (fixedFieldDeclaration); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { CheckStaticRequired(fixedFieldDeclaration); base.VisitFixedFieldDeclaration(fixedFieldDeclaration); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { FixAttributesAndDocComment(fixedFieldDeclaration); FormatCommas(fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); var lastLoc = fixedFieldDeclaration.StartLocation; curIndent.Push(IndentType.Block); foreach (var initializer in fixedFieldDeclaration.Variables) { if (lastLoc.Line != initializer.StartLocation.Line) { FixStatementIndentation(initializer.StartLocation); lastLoc = initializer.StartLocation; } initializer.AcceptVisitor(this); } curIndent.Pop(); FixSemicolon(fixedFieldDeclaration.SemicolonToken); }
public override void Visit(FixedField f) { var location = LocationsBag.GetMemberLocation(f); int locationIdx = 0; var newField = new FixedFieldDeclaration(); AddAttributeSection(newField, f); AddModifiers(newField, location); if (location != null && location.Count > 0) newField.AddChild(new CSharpTokenNode(Convert(location [locationIdx++]), FixedFieldDeclaration.FixedKeywordRole), FixedFieldDeclaration.FixedKeywordRole); if (f.TypeExpression != null) newField.AddChild(ConvertToType(f.TypeExpression), Roles.Type); var variable = new FixedVariableInitializer(); variable.AddChild(Identifier.Create(f.MemberName.Name, Convert(f.MemberName.Location)), Roles.Identifier); if (f.Initializer != null && !f.Initializer.IsNull) { variable.AddChild(new CSharpTokenNode(Convert(f.Initializer.Location), Roles.LBracket), Roles.LBracket); variable.AddChild((Expression)f.Initializer.Accept(this), Roles.Expression); var bracketLocations = LocationsBag.GetLocations(f.Initializer); if (bracketLocations != null) variable.AddChild(new CSharpTokenNode(Convert(bracketLocations [0]), Roles.RBracket), Roles.RBracket); } newField.AddChild(variable, FixedFieldDeclaration.VariableRole); if (f.Declarators != null) { foreach (var decl in f.Declarators) { var declLoc = LocationsBag.GetLocations(decl); if (declLoc != null) newField.AddChild(new CSharpTokenNode(Convert(declLoc [0]), Roles.Comma), Roles.Comma); variable = new FixedVariableInitializer(); variable.AddChild(Identifier.Create(decl.Name.Value, Convert(decl.Name.Location)), Roles.Identifier); variable.AddChild(new CSharpTokenNode(Convert(decl.Initializer.Location), Roles.LBracket), Roles.LBracket); variable.AddChild((Expression)decl.Initializer.Accept(this), Roles.Expression); var bracketLocations = LocationsBag.GetLocations(decl.Initializer); if (bracketLocations != null) variable.AddChild(new CSharpTokenNode(Convert(bracketLocations [0]), Roles.RBracket), Roles.RBracket); newField.AddChild(variable, FixedFieldDeclaration.VariableRole); } } if (location != null && location.Count > locationIdx) newField.AddChild(new CSharpTokenNode(Convert(location [locationIdx]), Roles.Semicolon), Roles.Semicolon); typeStack.Peek().AddChild(newField, Roles.TypeMemberRole); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { base.VisitFixedFieldDeclaration(fixedFieldDeclaration); CheckNode(fixedFieldDeclaration); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { FormatAttributedNode(fixedFieldDeclaration); FormatCommas(fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); if (fixedFieldDeclaration.NextSibling is FieldDeclaration || fixedFieldDeclaration.NextSibling is FixedFieldDeclaration) { EnsureBlankLinesAfter(fixedFieldDeclaration, policy.BlankLinesBetweenFields); } else if (IsMember(fixedFieldDeclaration.NextSibling)) { EnsureBlankLinesAfter(fixedFieldDeclaration, policy.BlankLinesBetweenMembers); } var lastLoc = fixedFieldDeclaration.StartLocation; curIndent.Push(IndentType.Block); foreach (var initializer in fixedFieldDeclaration.Variables) { if (lastLoc.Line != initializer.StartLocation.Line) { FixStatementIndentation(initializer.StartLocation); lastLoc = initializer.StartLocation; } initializer.AcceptVisitor(this); } curIndent.Pop (); }
public StringBuilder VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { throw new NotImplementedException(); }
public StringBuilder VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, int data) { throw new SLSharpException("SL# does not understand the fixed keyword."); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { if (fixedFieldDeclaration.HasModifier(Modifiers.Static)) { this.CheckDependency(fixedFieldDeclaration.ReturnType); base.VisitFixedFieldDeclaration(fixedFieldDeclaration); } }
public UnifiedElement VisitFixedFieldDeclaration( FixedFieldDeclaration fixedFieldDeclaration, object data) { throw new NotImplementedException("FixedFieldDeclaration"); }
public void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { throw new NotImplementedException(); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { base.VisitFixedFieldDeclaration(fixedFieldDeclaration); unsafeStateStack.Peek().UseUnsafeConstructs = true; }
public JNode VisitFixedFieldDeclaration(FixedFieldDeclaration node) { throw new NotImplementedException(); }
/// <inheritdoc/> public virtual void VisitFixedFieldDeclaration(FixedFieldDeclaration syntax) { VisitNode(syntax); }
public Node VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { return(CreateDummy(fixedFieldDeclaration)); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { Check(fixedFieldDeclaration.Name, fixedFieldDeclaration.NameToken, ctx.TranslateString("Fixed field")); }
public void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { JsonObject declaration = CreateJsonEntityDeclaration(fixedFieldDeclaration); AddKeyword(declaration, FixedFieldDeclaration.FixedKeywordRole); declaration.AddJsonValue("variables", GetCommaSeparatedList(fixedFieldDeclaration.Variables)); Push(declaration); throw new FirstTimeUseException(); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration syntax) { _underlyingVisitor.VisitFixedFieldDeclaration(syntax); }
public void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { StartNode(fixedFieldDeclaration); WriteAttributes(fixedFieldDeclaration.Attributes); WriteModifiers(fixedFieldDeclaration.ModifierTokens); WriteKeyword(FixedFieldDeclaration.FixedKeywordRole); Space(); fixedFieldDeclaration.ReturnType.AcceptVisitor(this); Space(); WriteCommaSeparatedList(fixedFieldDeclaration.Variables); Semicolon(); EndNode(fixedFieldDeclaration); }
public virtual void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { if (this.ThrowException) { throw (Exception)this.CreateException(fixedFieldDeclaration); } }
public RedILNode VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, State data) { throw new System.NotImplementedException(); }
public void VisitFixedFieldDeclaration(FixedFieldDeclaration node) { NotSupported(node); }
public override void Visit (FixedField f) { var location = LocationsBag.GetMemberLocation (f); var newField = new FixedFieldDeclaration (); AddAttributeSection (newField, f); AddModifiers (newField, location); if (location != null) newField.AddChild (new CSharpTokenNode (Convert (location [0]), "fixed".Length), FixedFieldDeclaration.Roles.Keyword); newField.AddChild (ConvertToType (f.TypeName), FixedFieldDeclaration.Roles.Type); var variable = new FixedVariableInitializer (); variable.AddChild (new Identifier (f.MemberName.Name, Convert (f.MemberName.Location)), FixedFieldDeclaration.Roles.Identifier); if (!f.Initializer.IsNull) { var bracketLocations = LocationsBag.GetLocations (f.Initializer); if (bracketLocations != null && bracketLocations.Count > 1) variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.LBracket); variable.AddChild ((Expression)f.Initializer.Accept (this), FieldDeclaration.Roles.Expression); if (bracketLocations != null && bracketLocations.Count > 1) variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket); } newField.AddChild (variable, FixedFieldDeclaration.VariableRole); if (f.Declarators != null) { foreach (var decl in f.Declarators) { var declLoc = LocationsBag.GetLocations (decl); if (declLoc != null) newField.AddChild (new CSharpTokenNode (Convert (declLoc [0]), 1), FieldDeclaration.Roles.Comma); variable = new FixedVariableInitializer (); variable.AddChild (new Identifier (decl.Name.Value, Convert (decl.Name.Location)), FieldDeclaration.Roles.Identifier); if (!decl.Initializer.IsNull) { var bracketLocations = LocationsBag.GetLocations (f.Initializer); if (bracketLocations != null && bracketLocations.Count > 1) variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.LBracket); variable.AddChild ((Expression)decl.Initializer.Accept (this), FieldDeclaration.Roles.Expression); if (bracketLocations != null && bracketLocations.Count > 1) variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), 1), FixedFieldDeclaration.Roles.RBracket); } newField.AddChild (variable, FixedFieldDeclaration.VariableRole); } } if (location != null) newField.AddChild (new CSharpTokenNode (Convert (location [1]), 1), FieldDeclaration.Roles.Semicolon); typeStack.Peek ().AddChild (newField, TypeDeclaration.MemberRole); }
public StringBuilder VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, int data) { throw new ASLException("ASL does not understand the fixed keyword."); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { throw NotSupportedToConsistency(); }
public override IUnresolvedEntity VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, object data) { // TODO: add support for fixed fields return base.VisitFixedFieldDeclaration(fixedFieldDeclaration, data); }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { // nothing }
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { }
public virtual Node VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration) { throw new System.NotImplementedException(); }