-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFASTPyCaseClause.class.st
More file actions
101 lines (81 loc) · 2.75 KB
/
FASTPyCaseClause.class.st
File metadata and controls
101 lines (81 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
"
I represent a case clause in a match statement in Python.
## Relations
======================
### Parents
| Relation | Origin | Opposite | Type | Comment |
|---|
| `fastBehaviouralParent` | `FASTTStatementBlock` | `statementBlock` | `FASTTWithStatements` | Behavioural entity containing the statement block.|
| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body|
| `parentMatchStatement` | `FASTPyCaseClause` | `cases` | `FASTPyMatchStatement` | |
| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.|
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `condition` | `FASTTWithCondition` | `parentConditional` | `FASTTExpression` | The boolean condition tested|
| `pattern` | `FASTPyCaseClause` | `parentCaseClause` | `FASTPyTPattern` | |
| `statements` | `FASTTStatementBlock` | `statementContainer` | `FASTTStatement` | Statements enclosed in this block|
## Properties
======================
| Name | Type | Default value | Comment |
|---|
| `alias` | `String` | nil | Alias used if an as pattern is used in the clause.|
| `endPos` | `Number` | nil | |
| `startPos` | `Number` | nil | |
"
Class {
#name : 'FASTPyCaseClause',
#superclass : 'FASTPyEntity',
#traits : 'FASTTStatementBlock + FASTTWithCondition',
#classTraits : 'FASTTStatementBlock classTrait + FASTTWithCondition classTrait',
#instVars : [
'#alias => FMProperty',
'#parentMatchStatement => FMOne type: #FASTPyMatchStatement opposite: #cases',
'#pattern => FMOne type: #FASTPyTPattern opposite: #parentCaseClause'
],
#category : 'FAST-Python-Model-Entities',
#package : 'FAST-Python-Model',
#tag : 'Entities'
}
{ #category : 'meta' }
FASTPyCaseClause class >> annotation [
<FMClass: #CaseClause super: #FASTPyEntity>
<package: #'FAST-Python-Model'>
<generated>
^ self
]
{ #category : 'accessing' }
FASTPyCaseClause >> alias [
<FMProperty: #alias type: #String>
<generated>
<FMComment: 'Alias used if an as pattern is used in the clause.'>
^ alias
]
{ #category : 'accessing' }
FASTPyCaseClause >> alias: anObject [
<generated>
alias := anObject
]
{ #category : 'accessing' }
FASTPyCaseClause >> parentMatchStatement [
"Relation named: #parentMatchStatement type: #FASTPyMatchStatement opposite: #cases"
<generated>
<container>
^ parentMatchStatement
]
{ #category : 'accessing' }
FASTPyCaseClause >> parentMatchStatement: anObject [
<generated>
parentMatchStatement := anObject
]
{ #category : 'accessing' }
FASTPyCaseClause >> pattern [
"Relation named: #pattern type: #FASTPyTPattern opposite: #parentCaseClause"
<generated>
^ pattern
]
{ #category : 'accessing' }
FASTPyCaseClause >> pattern: anObject [
<generated>
pattern := anObject
]