diff --git a/src/EdgeDB.Net.QueryBuilder/Grammar/Reducers/ShapeReducer.cs b/src/EdgeDB.Net.QueryBuilder/Grammar/Reducers/ShapeReducer.cs index ba93ff15..b50ce47b 100644 --- a/src/EdgeDB.Net.QueryBuilder/Grammar/Reducers/ShapeReducer.cs +++ b/src/EdgeDB.Net.QueryBuilder/Grammar/Reducers/ShapeReducer.cs @@ -18,7 +18,7 @@ public void Reduce(IQueryBuilder builder, QueryWriter writer) { Action? modifier = marker switch { - _ when marker.Parent?.Type is MarkerType.Function => ApplyShapeReducer, + _ when marker.Parent?.Type is MarkerType.FunctionArg => ApplyShapeReducer, _ => null }; diff --git a/src/EdgeDB.Net.QueryBuilder/Lexical/Marker.cs b/src/EdgeDB.Net.QueryBuilder/Lexical/Marker.cs index 33921b92..2e57ad92 100644 --- a/src/EdgeDB.Net.QueryBuilder/Lexical/Marker.cs +++ b/src/EdgeDB.Net.QueryBuilder/Lexical/Marker.cs @@ -23,6 +23,9 @@ public Marker? Parent if(marker == this) continue; + if (marker.Type is MarkerType.Verbose) + continue; + if (marker.Position > Position || marker.Size < Size) continue; if (bestMatch is null) { @@ -45,7 +48,7 @@ public IOrderedEnumerable Parents { get { - return _writer.Markers.Values.SelectMany(x => x).Where(x => x != this && x.Position <= Position && x.Size >= Size) + return _writer.Markers.Values.SelectMany(x => x).Where(x => x.Type is not MarkerType.Verbose && x != this && x.Position <= Position && x.Size >= Size) .OrderBy(x => Position - x.Position + x.Size); } }