1 | import type { PresentArray } from '@glimmer/interfaces';
|
2 | import type { SourceSpan } from './span';
|
3 | export interface SourceLocation {
|
4 | start: SourcePosition;
|
5 | end: SourcePosition;
|
6 | }
|
7 | export interface SourcePosition {
|
8 |
|
9 | line: number;
|
10 |
|
11 | column: number;
|
12 | }
|
13 | export declare const UNKNOWN_POSITION: Readonly<{
|
14 | readonly line: 1;
|
15 | readonly column: 0;
|
16 | }>;
|
17 | export declare const SYNTHETIC_LOCATION: Readonly<{
|
18 | readonly source: "(synthetic)";
|
19 | readonly start: Readonly<{
|
20 | readonly line: 1;
|
21 | readonly column: 0;
|
22 | }>;
|
23 | readonly end: Readonly<{
|
24 | readonly line: 1;
|
25 | readonly column: 0;
|
26 | }>;
|
27 | }>;
|
28 |
|
29 | export declare const SYNTHETIC: Readonly<{
|
30 | readonly source: "(synthetic)";
|
31 | readonly start: Readonly<{
|
32 | readonly line: 1;
|
33 | readonly column: 0;
|
34 | }>;
|
35 | readonly end: Readonly<{
|
36 | readonly line: 1;
|
37 | readonly column: 0;
|
38 | }>;
|
39 | }>;
|
40 | export declare const TEMPORARY_LOCATION: Readonly<{
|
41 | readonly source: "(temporary)";
|
42 | readonly start: Readonly<{
|
43 | readonly line: 1;
|
44 | readonly column: 0;
|
45 | }>;
|
46 | readonly end: Readonly<{
|
47 | readonly line: 1;
|
48 | readonly column: 0;
|
49 | }>;
|
50 | }>;
|
51 | export declare const NON_EXISTENT_LOCATION: Readonly<{
|
52 | readonly source: "(nonexistent)";
|
53 | readonly start: Readonly<{
|
54 | readonly line: 1;
|
55 | readonly column: 0;
|
56 | }>;
|
57 | readonly end: Readonly<{
|
58 | readonly line: 1;
|
59 | readonly column: 0;
|
60 | }>;
|
61 | }>;
|
62 | export declare const BROKEN_LOCATION: Readonly<{
|
63 | readonly source: "(broken)";
|
64 | readonly start: Readonly<{
|
65 | readonly line: 1;
|
66 | readonly column: 0;
|
67 | }>;
|
68 | readonly end: Readonly<{
|
69 | readonly line: 1;
|
70 | readonly column: 0;
|
71 | }>;
|
72 | }>;
|
73 | export type LocatedWithSpan = {
|
74 | offsets: SourceSpan;
|
75 | };
|
76 | export type LocatedWithOptionalSpan = {
|
77 | offsets: SourceSpan | null;
|
78 | };
|
79 | export type LocatedWithPositions = {
|
80 | loc: SourceLocation;
|
81 | };
|
82 | export type LocatedWithOptionalPositions = {
|
83 | loc?: SourceLocation;
|
84 | };
|
85 | export declare function isLocatedWithPositionsArray(location: LocatedWithOptionalPositions[]): location is PresentArray<LocatedWithPositions>;
|
86 | export declare function isLocatedWithPositions(location: LocatedWithOptionalPositions): location is LocatedWithPositions;
|
87 | export type HasSourceLocation = SourceLocation | LocatedWithPositions | PresentArray<LocatedWithPositions>;
|
88 | export type MaybeHasSourceLocation = null | LocatedWithOptionalPositions | LocatedWithOptionalPositions[];
|