Compare commits
	
		
			2 Commits
		
	
	
		
			568134a7e9
			...
			abc6e44fb2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | abc6e44fb2 | ||
|  | cce841f48e | 
							
								
								
									
										10
									
								
								file/file.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								file/file.go
									
									
									
									
									
								
							| @ -111,3 +111,13 @@ func (file *File) Location (width int) (location Location) { | |||||||
| 		width:  width, | 		width:  width, | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | // Path returns the path that teh file is located at. | ||||||
|  | func (file *File) Path () (path string) { | ||||||
|  | 	return file.path | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // GetLine returns the line at the specified index. | ||||||
|  | func (file *File) GetLine (index int) (line string) { | ||||||
|  | 	return file.lines[index] | ||||||
|  | } | ||||||
|  | |||||||
| @ -9,11 +9,6 @@ type Location struct { | |||||||
| 	width  int | 	width  int | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // NewError creates a new error at this location. |  | ||||||
| func (location Location) NewError (message string, kind ErrorKind) (err Error) { |  | ||||||
| 	return NewError(location, message, kind) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // File returns the file the location is in | // File returns the file the location is in | ||||||
| func (location Location) File () (file *File) { | func (location Location) File () (file *File) { | ||||||
| 	return location.file | 	return location.file | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user