public override bool IsValidLineStarter(CodeNodeType nodeType) { if (nodeType == 30 || nodeType == 42 || nodeType == 19 || nodeType == 33 || nodeType == 31 || nodeType == 28 || nodeType == 29 || nodeType == 26 || nodeType == 25 || nodeType == 35) { return true; } return nodeType == 39; }
public CodeNode(string alias, int startLine, int endLine, string comment = null, CodeNodeType type = CodeNodeType.Function) { Alias = alias; StartLine = startLine; EndLine = endLine; Comment = comment; NodeType = type; }
public override bool IsValidLineStarter(CodeNodeType nodeType) { return(nodeType == CodeNodeType.FieldReferenceExpression || nodeType == CodeNodeType.PropertyReferenceExpression || nodeType == CodeNodeType.MethodInvocationExpression || nodeType == CodeNodeType.SafeCastExpression || nodeType == CodeNodeType.ExplicitCastExpression || nodeType == CodeNodeType.ThisReferenceExpression || nodeType == CodeNodeType.BaseReferenceExpression || nodeType == CodeNodeType.VariableReferenceExpression || nodeType == CodeNodeType.ArgumentReferenceExpression || nodeType == CodeNodeType.TypeOfExpression || nodeType == CodeNodeType.ArrayIndexerExpression); }
private int GetImageIndex(CodeNodeType nodeType) { switch (nodeType) { case CodeNodeType.Function: return(-1); case CodeNodeType.AnonymousFunction: return(1); case CodeNodeType.Object: return(0); } return(-1); }
private void ProcessVariableReferenceExpression(VariableReferenceExpression variableReferenceExpression) { VariableReference variableReference = variableReferenceExpression.Variable; if (this.variableToAssignedCodeNodeTypeMap.ContainsKey(variableReference)) { CodeNodeType variableAssignmentType = this.variableToAssignedCodeNodeTypeMap[variableReference]; VariableDefinition variable = variableReference.Resolve(); if (!this.variablesToNotInline.Contains(variable)) { if (!this.language.IsValidLineStarter(variableAssignmentType)) { this.variablesToNotInline.Add(variable); } } } }
private bool IsValidObjectComparisonNode(CodeNodeType codeNodeType) { return(codeNodeType == CodeNodeType.AnonymousObjectCreationExpression || codeNodeType == CodeNodeType.ArgumentReferenceExpression || codeNodeType == CodeNodeType.FieldReferenceExpression || codeNodeType == CodeNodeType.LiteralExpression || codeNodeType == CodeNodeType.MethodInvocationExpression || codeNodeType == CodeNodeType.ObjectCreationExpression || codeNodeType == CodeNodeType.PropertyReferenceExpression || codeNodeType == CodeNodeType.VariableReferenceExpression || codeNodeType == CodeNodeType.ThisReferenceExpression || codeNodeType == CodeNodeType.ArrayCreationExpression || codeNodeType == CodeNodeType.ArrayIndexerExpression || codeNodeType == CodeNodeType.LambdaExpression || codeNodeType == CodeNodeType.LinqQueryExpression || codeNodeType == CodeNodeType.UnaryExpression); }
public override bool IsValidLineStarter(CodeNodeType nodeType) { // As far as we know, basically all nodes can be line starters. return(true); }
private bool IsValidObjectComparisonNode(CodeNodeType codeNodeType) { return codeNodeType == CodeNodeType.AnonymousObjectCreationExpression || codeNodeType == CodeNodeType.ArgumentReferenceExpression || codeNodeType == CodeNodeType.FieldReferenceExpression || codeNodeType == CodeNodeType.LiteralExpression || codeNodeType == CodeNodeType.MethodInvocationExpression || codeNodeType == CodeNodeType.ObjectCreationExpression || codeNodeType == CodeNodeType.PropertyReferenceExpression || codeNodeType == CodeNodeType.VariableReferenceExpression || codeNodeType == CodeNodeType.ThisReferenceExpression || codeNodeType == CodeNodeType.ArrayCreationExpression || codeNodeType == CodeNodeType.ArrayIndexerExpression || codeNodeType == CodeNodeType.LambdaExpression || codeNodeType == CodeNodeType.LinqQueryExpression || codeNodeType == CodeNodeType.UnaryExpression; }
public abstract bool IsValidLineStarter(CodeNodeType nodeType);
public override bool IsValidLineStarter(CodeNodeType nodeType) { return nodeType == CodeNodeType.FieldReferenceExpression || nodeType == CodeNodeType.PropertyReferenceExpression || nodeType == CodeNodeType.MethodInvocationExpression || nodeType == CodeNodeType.SafeCastExpression || nodeType == CodeNodeType.CastExpression || nodeType == CodeNodeType.ThisReferenceExpression || nodeType == CodeNodeType.BaseReferenceExpression || nodeType == CodeNodeType.VariableReferenceExpression || nodeType == CodeNodeType.ArgumentReferenceExpression || nodeType == CodeNodeType.TypeOfExpression || nodeType == CodeNodeType.ArrayIndexerExpression; }
public override bool IsValidLineStarter(CodeNodeType nodeType) { return(false); }
public override bool IsValidLineStarter(CodeNodeType nodeType) { return true; }
private int GetImageIndex(CodeNodeType nodeType) { switch (nodeType) { case CodeNodeType.Function: return -1; case CodeNodeType.AnonymousFunction: return 1; case CodeNodeType.Object: return 0; } return -1; }
internal CodeNode(CodeNodeType type) { Flags |= CodeNodeFlags.Removable; Type = type; }
public override bool IsValidLineStarter(CodeNodeType nodeType) { return false; }