[Syntax] Parse composition type node

This commit is contained in:
Rintaro Ishizaki
2017-12-15 20:24:18 +09:00
committed by Xi Ge
parent 8b7afffd81
commit 53b2e0fe14
9 changed files with 57 additions and 39 deletions

View File

@@ -2,6 +2,14 @@ from Child import Child
from Node import Node # noqa: I201
PATTERN_NODES = [
# type-annotation -> ':' type
Node('TypeAnnotation', kind='Syntax',
children=[
Child('Colon', kind='ColonToken'),
Child('Type', kind='Type'),
]),
# enum-case-pattern -> type-identifier? '.' identifier tuple-pattern?
Node('EnumCasePattern', kind='Pattern',
children=[