-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix unist node handling remove `unist` package deps * fix
- Loading branch information
Showing
5 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
export type UnistPoint = { | ||
/** | ||
* Column in a source file (1-indexed integer). | ||
*/ | ||
column: number; | ||
|
||
/** | ||
* Line in a source file (1-indexed integer). | ||
*/ | ||
line: number; | ||
|
||
/** | ||
* Character in a source file (0-indexed integer). | ||
*/ | ||
offset?: number; | ||
}; | ||
|
||
export type UnistPosition = { | ||
/** | ||
* Place of the first character of the parsed source region. | ||
*/ | ||
start: UnistPoint; | ||
|
||
/** | ||
* Place of the first character after the parsed source region. | ||
*/ | ||
end: UnistPoint; | ||
|
||
/** | ||
* Start column at each index (plus start line) in the source region, | ||
* for elements that span multiple lines. | ||
*/ | ||
indent?: number[]; | ||
}; | ||
|
||
export type UnistNode = { | ||
/** | ||
* The variant of a node. | ||
*/ | ||
type: string; | ||
|
||
/** | ||
* Information from the ecosystem. | ||
*/ | ||
data?: unknown | undefined; | ||
/** | ||
* Location of a node in a source document. | ||
* Must not be present if a node is generated. | ||
*/ | ||
position?: UnistPosition | undefined; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters