-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
38 lines (29 loc) · 1.25 KB
/
Copy pathtypes.go
File metadata and controls
38 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package api
import (
"github.com/MontFerret/api/result"
"github.com/MontFerret/api/source"
)
type (
// Source represents the input data for a Ferret query.
Source = source.Source
// Position represents a specific point in a source file, defined by line and column numbers.
Position = source.Position
// Span represents a range of characters in a source file, defined by start and end positions.
Span = source.Span
// Location represents the location of a specific point in a source file, including the file name and position.
Location = source.Location
// Range represents a range of characters in a source file, including the location and span.
Range = source.Range
// Output is the encoded result returned from session or runtime execution.
// Execution returns a pointer: nil means no output was produced, while a
// non-nil pointer to a zero-valued Output still represents produced output.
Output = result.Output
)
// NewSource creates a new Source instance with the given name and content.
func NewSource(name, content string) Source {
return source.New(name, content)
}
// NewAnonymousSource creates a new anonymous Source instance with the given content.
func NewAnonymousSource(content string) Source {
return source.NewAnonymous(content)
}