mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* [Experiment] Make Syntax nodes structs instead of classes * [Experiment] Add Hashable conformance to concrete types * Fix pep8 violation * Remove AnySyntax, explicitly specialize SyntaxCollection nodes * Refine the comment for SyntaxCollection nodes
15 lines
406 B
Python
15 lines
406 B
Python
from Node import Node
|
|
|
|
COMMON_NODES = [
|
|
Node('Decl', kind='Syntax'),
|
|
Node('Expr', kind='Syntax'),
|
|
Node('Stmt', kind='Syntax'),
|
|
Node('Type', kind='Syntax'),
|
|
Node('Pattern', kind='Syntax'),
|
|
Node('UnknownDecl', kind='Decl'),
|
|
Node('UnknownExpr', kind='Expr'),
|
|
Node('UnknownStmt', kind='Stmt'),
|
|
Node('UnknownType', kind='Type'),
|
|
Node('UnknownPattern', kind='Pattern'),
|
|
]
|