Skip to content

Commit

Permalink
chore: add type string list export
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonstudio committed Jan 19, 2024
1 parent 960c72b commit 8951973
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ast/declaration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type DeclarationNode = UnionSyntaxNode<typeof nodeMap>;
export type DeclarationNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const declarationNodeTypes = Object.keys(nodeMap) as DeclarationNodeType[];
export * from './contract-body-element';
export * from './contract-definition';
export * from './enum-definition';
Expand Down
1 change: 1 addition & 0 deletions src/ast/expression/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type ExpressionNode = UnionSyntaxNode<typeof nodeMap>;
export type ExpressionNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const expressionNodeTypes = Object.keys(nodeMap) as ExpressionNodeType[];
export * from './assign-op';
export * from './assignment';
export * from './binary-operation';
Expand Down
3 changes: 3 additions & 0 deletions src/ast/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as nodeMap from './index.node';
import { DeclarationNode } from './declaration';
import { ExpressionNode } from './expression';
import { MetaNode } from './meta';
Expand All @@ -15,6 +16,8 @@ export type SyntaxNode =

export type SyntaxNodeType = SyntaxNode['type'];

export const syntaxNodeTypes = Object.keys(nodeMap) as SyntaxNodeType[];

export * from './declaration';
export * from './expression';
export * from './meta';
Expand Down
1 change: 1 addition & 0 deletions src/ast/meta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type MetaNode = UnionSyntaxNode<typeof nodeMap>;
export type MetaNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const metaNodeTypes = Object.keys(nodeMap) as MetaNodeType[];
export * from './data-location';
export * from './identifier-path';
export * from './import-aliases';
Expand Down
1 change: 1 addition & 0 deletions src/ast/statement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type StatementNode = UnionSyntaxNode<typeof nodeMap>;
export type StatementNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const statementNodeTypes = Object.keys(nodeMap) as StatementNodeType[];
export * from './assembly-flags';
export * from './assembly-statement';
export * from './block';
Expand Down
1 change: 1 addition & 0 deletions src/ast/type/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type TypeNode = UnionSyntaxNode<typeof nodeMap>;
export type TypeNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const typeNodeTypes = Object.keys(nodeMap) as TypeNodeType[];
export * from './elementary-type-name';
export * from './function-type-name';
export * from './mapping-key-type';
Expand Down
1 change: 1 addition & 0 deletions src/ast/yul/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UnionSyntaxNode, UnionSyntaxNodeType } from '../base';
export type YulNode = UnionSyntaxNode<typeof nodeMap>;
export type YulNodeType = UnionSyntaxNodeType<typeof nodeMap>;

export const yulNodeTypes = Object.keys(nodeMap) as YulNodeType[];
export * from './yul-assignment';
export * from './yul-block';
export * from './yul-boolean';
Expand Down

0 comments on commit 8951973

Please sign in to comment.