-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CST to AST transformer for tree-sitter
Refs #35
- Loading branch information
Showing
25 changed files
with
1,208 additions
and
110 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 @@ | ||
import stampit from 'stampit'; | ||
|
||
interface ParseResult { | ||
type: 'parseResult'; | ||
errors: unknown[]; | ||
annotations: unknown[]; | ||
rootNode: unknown; | ||
} | ||
|
||
const ParseResult: stampit.Stamp<ParseResult> = stampit({ | ||
props: { | ||
type: 'parseResult', | ||
errors: [], | ||
annotations: [], | ||
rootNode: null, | ||
}, | ||
}); | ||
|
||
export default ParseResult; |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
export { default as JsonDocument } from './nodes/JsonDocument'; | ||
export { default as JsonObject } from './nodes/JsonObject'; | ||
export { default as JsonProperty } from './nodes/JsonProperty'; | ||
export { default as JsonArray } from './nodes/JsonArray'; | ||
export { default as JsonValue } from './nodes/JsonValue'; | ||
export { default as JsonKey } from './nodes/JsonKey'; | ||
export { default as JsonComment } from './nodes/JsonComment'; | ||
export { default as JsonString } from './nodes/JsonString'; | ||
export { default as JsonNumber } from './nodes/JsonNumber'; | ||
export { default as JsonTrue } from './nodes/JsonTrue'; | ||
export { default as JsonFalse } from './nodes/JsonFalse'; | ||
export { default as JsonNull } from './nodes/JsonNull'; | ||
export { default as JsonDocument } from './nodes/json/JsonDocument'; | ||
export { default as JsonObject } from './nodes/json/JsonObject'; | ||
export { default as JsonProperty } from './nodes/json/JsonProperty'; | ||
export { default as JsonArray } from './nodes/json/JsonArray'; | ||
export { default as JsonValue } from './nodes/json/JsonValue'; | ||
export { default as JsonKey } from './nodes/json/JsonKey'; | ||
export { default as JsonComment } from './nodes/json/JsonComment'; | ||
export { default as JsonString } from './nodes/json/JsonString'; | ||
export { default as JsonNumber } from './nodes/json/JsonNumber'; | ||
export { default as JsonTrue } from './nodes/json/JsonTrue'; | ||
export { default as JsonFalse } from './nodes/json/JsonFalse'; | ||
export { default as JsonNull } from './nodes/json/JsonNull'; | ||
export { default as ParseResult } from './ParseResult'; | ||
export { default as Position } from './Position'; | ||
export { Point } from './Position'; |
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
2 changes: 1 addition & 1 deletion
2
...kages/apidom-ast/src/nodes/JsonComment.ts → .../apidom-ast/src/nodes/json/JsonComment.ts
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
2 changes: 1 addition & 1 deletion
2
...ackages/apidom-ast/src/nodes/JsonFalse.ts → ...es/apidom-ast/src/nodes/json/JsonFalse.ts
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
2 changes: 1 addition & 1 deletion
2
.../packages/apidom-ast/src/nodes/JsonKey.ts → ...ages/apidom-ast/src/nodes/json/JsonKey.ts
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
2 changes: 1 addition & 1 deletion
2
...packages/apidom-ast/src/nodes/JsonNull.ts → ...ges/apidom-ast/src/nodes/json/JsonNull.ts
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
2 changes: 1 addition & 1 deletion
2
...ckages/apidom-ast/src/nodes/JsonNumber.ts → ...s/apidom-ast/src/nodes/json/JsonNumber.ts
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
2 changes: 1 addition & 1 deletion
2
...ckages/apidom-ast/src/nodes/JsonString.ts → ...s/apidom-ast/src/nodes/json/JsonString.ts
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
2 changes: 1 addition & 1 deletion
2
...packages/apidom-ast/src/nodes/JsonTrue.ts → ...ges/apidom-ast/src/nodes/json/JsonTrue.ts
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
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...s/apidom-ast/src/nodes/traits/JsonNode.ts → ...dom-ast/src/nodes/json/traits/JsonNode.ts
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
Oops, something went wrong.