public void Visit(LookupExpression node) { if (node != null) { DoesRequire = true; } }
public override void Visit(LookupExpression node) { // see if this node is equivalent to the target node. // if it is, then the tree has at least one reference to the target lookup if (node != null && node.IsEquivalentTo(m_lookup)) { m_hasReference = true; } }
/// <summary> /// creates method call to get value from lookup columns /// </summary> /// <param name="lookup">measure expression</param> /// <returns>get value method call expression</returns> protected override Expression VisitLookup(LookupExpression lookup) { string measureProjectionName = MeasureNameReference(lookup.Name); var measureExpressions = new Expression[] { Expression.Constant(measureProjectionName), Expression.Constant(lookup.Type) }; return(Expression.Convert(Expression.Call(_row, _getValue, measureExpressions), lookup.Type)); }
public static bool References(AstNode node, LookupExpression lookup) { if (node == null || lookup == null) { return(false); } var visitor = new ReferencesVisitor(lookup); node.Accept(visitor); return(visitor.m_hasReference); }
public override void Visit(LookupExpression node) { // only lookups need to be detached. if (node != null) { // if the node's vairable field is set, remove it from the // field's list of references. var variableField = node.VariableField; if (variableField != null) { variableField.References.Remove(node); } } }
public void Visit(LookupExpression node) { // we are only a match if we are looking for the first part if (node != null && m_index == 0) { // see if the name matches; and if there is a field, it should be a global if (string.CompareOrdinal(node.Name, m_parts[0]) == 0 && (node.VariableField == null || node.VariableField.FieldType == FieldType.UndefinedGlobal || node.VariableField.FieldType == FieldType.Global)) { // match! m_isMatch = true; } } }
public void MarkSegment(AstNode node, int startLine, int startColumn, string name, SourceContext context) { if (node == null || string.IsNullOrEmpty(name)) { return; } // see if this is within a function object node, // AND if this segment has the same name as the function name // AND this context isn't the same as the entire function context. // this should only be true for the function NAME segment. var functionObject = node as FunctionObject; if (functionObject != null && functionObject.Binding != null && string.CompareOrdinal(name, functionObject.Binding.Name) == 0 && context != functionObject.Context) { // adjust the offsets startLine += m_lineOffset; startColumn += m_columnOffset; // it does -- so this is the segment that corresponds to the function object's name, which // for this format we want to output a separate segment for. It used to be its own Lookup // node child of the function object, so we need to create a fake node here, start a new // symbol from it, end the symbol, then write it. var fakeLookup = new LookupExpression(context) { Name = name }; var nameSymbol = JavaScriptSymbol.StartNew(fakeLookup, startLine, startColumn, GetSourceFileIndex(functionObject.Context.Document.FileContext)); // the name will never end on a different line -- it's a single unbreakable token. The length is just // the length of the name, so add that number to the column start. And the parent context is the function // name (again) nameSymbol.End(startLine, startColumn + name.Length, name); nameSymbol.WriteTo(m_writer); } }
public override void Visit(LookupExpression node) { // same logic for most nodes TypicalHandler(node); }
public void Visit(LookupExpression node) { // we're good }
public void Visit(LookupExpression node) { // lookup identifier, so we don't care }
public void Visit(LookupExpression node) { // add the lookup to the list node.IfNotNull(n => m_lookups.Add(n)); }
internal void ReportUndefined(LookupExpression lookup) { var reference = new UndefinedReference(lookup, this); Document.ReportUndefined(reference); }
public virtual void Visit(LookupExpression node) { // no children }
ReferencesVisitor(LookupExpression lookup) { m_lookup = lookup; }
public void Visit(LookupExpression node) { // invalid! ignore IsValid = false; }