Removed comments
This commit is contained in:
		
							parent
							
								
									f6df35e069
								
							
						
					
					
						commit
						d2325df729
					
				@ -491,7 +491,7 @@ pub fn getFieldAccessTypeNode(
 | 
				
			|||||||
                                } else if (next.id == .LParen) {
 | 
					                                } else if (next.id == .LParen) {
 | 
				
			||||||
                                    paren_count += 1;
 | 
					                                    paren_count += 1;
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            } else unreachable;
 | 
					                            } else return null;
 | 
				
			||||||
                        } else return null;
 | 
					                        } else return null;
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                    else => {},
 | 
					                    else => {},
 | 
				
			||||||
@ -784,8 +784,7 @@ const PositionContext = union(enum) {
 | 
				
			|||||||
    other,
 | 
					    other,
 | 
				
			||||||
    empty,
 | 
					    empty,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // @TODO remove pub
 | 
					    fn range(self: PositionContext) ?SourceRange {
 | 
				
			||||||
    pub fn range(self: PositionContext) ?SourceRange {
 | 
					 | 
				
			||||||
        return switch (self) {
 | 
					        return switch (self) {
 | 
				
			||||||
            .builtin => |r| r,
 | 
					            .builtin => |r| r,
 | 
				
			||||||
            .comment => null,
 | 
					            .comment => null,
 | 
				
			||||||
@ -825,7 +824,6 @@ fn tokenRangeAppend(prev: SourceRange, token: std.zig.Token) SourceRange {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// @TODO Test this thoroughly
 | 
					 | 
				
			||||||
pub fn documentPositionContext(allocator: *std.mem.Allocator, document: types.TextDocument, position: types.Position) !PositionContext {
 | 
					pub fn documentPositionContext(allocator: *std.mem.Allocator, document: types.TextDocument, position: types.Position) !PositionContext {
 | 
				
			||||||
    const line = try document.getLine(@intCast(usize, position.line));
 | 
					    const line = try document.getLine(@intCast(usize, position.line));
 | 
				
			||||||
    const pos_char = @intCast(usize, position.character) + 1;
 | 
					    const pos_char = @intCast(usize, position.character) + 1;
 | 
				
			||||||
@ -837,7 +835,6 @@ pub fn documentPositionContext(allocator: *std.mem.Allocator, document: types.Te
 | 
				
			|||||||
    var tokenizer = std.zig.Tokenizer.init(line[0..idx]);
 | 
					    var tokenizer = std.zig.Tokenizer.init(line[0..idx]);
 | 
				
			||||||
    var stack = try std.ArrayList(StackState).initCapacity(&arena.allocator, 8);
 | 
					    var stack = try std.ArrayList(StackState).initCapacity(&arena.allocator, 8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // @TODO What happens when we don't close a string? (probably an .Eof)
 | 
					 | 
				
			||||||
    while (true) {
 | 
					    while (true) {
 | 
				
			||||||
        const tok = tokenizer.next();
 | 
					        const tok = tokenizer.next();
 | 
				
			||||||
        // Early exits.
 | 
					        // Early exits.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user