Skip to content

Commit

Permalink
added more unhandled types
Browse files Browse the repository at this point in the history
  • Loading branch information
azizghuloum committed Nov 25, 2024
1 parent 8dff832 commit 409298c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/AST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,21 @@ export type list_tag =
| "statement_block"
| "empty_statement"
| "array"
| "string"
| "member_expression"
| "parenthesized_expression"
| "ternary_expression"
| "type_alias_declaration"
| "type_annotation"
| "property_signature"
| "predefined_type"
| "literal_type"
| "tuple_type"
| "object_type"
| "pair"
| "object"
| "array_pattern"
| "object_pattern"
| "union_type"
| "slice"
| "ERROR";
Expand All @@ -64,12 +73,21 @@ export const list_tags: { [k in list_tag]: list_tag } = {
empty_statement: "empty_statement",
slice: "slice",
array: "array",
string: "string",
member_expression: "member_expression",
parenthesized_expression: "parenthesized_expression",
ternary_expression: "ternary_expression",
type_alias_declaration: "type_alias_declaration",
type_annotation: "type_annotation",
property_signature: "property_signature",
predefined_type: "predefined_type",
literal_type: "literal_type",
tuple_type: "tuple_type",
object_type: "object_type",
pair: "pair",
object: "object",
object_pattern: "object_pattern",
array_pattern: "array_pattern",
union_type: "union_type",
ERROR: "ERROR",
};
Expand Down
1 change: 1 addition & 0 deletions src/parser-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function absurdly(node: Parser.SyntaxNode): AST {
case "type_identifier":
case "shorthand_property_identifier":
case "property_identifier":
case "string_fragment":
case "ERROR": {
return { type: "atom", tag: node.type, content: node.text };
}
Expand Down

0 comments on commit 409298c

Please sign in to comment.