-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
456 changed files
with
29,772 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
repository/ViennaTalk-AST-Core/ViennaAbstractFunctionTypeNode.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Class { | ||
#name : #ViennaAbstractFunctionTypeNode, | ||
#superclass : #ViennaTypeNode, | ||
#type : #variable, | ||
#category : #'ViennaTalk-AST-Core' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
ViennaAbstractFunctionTypeNode class >> argumentType: aViennaTypeNode1 returnType: aViennaTypeNode2 [ | ||
|
||
^ (self new: 2) | ||
argumentType: aViennaTypeNode1; | ||
returnType: aViennaTypeNode2; | ||
yourself | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAbstractFunctionTypeNode class >> isAbstract [ | ||
|
||
^ self = ViennaAbstractFunctionTypeNode | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractFunctionTypeNode >> argumentType [ | ||
|
||
^ self at: 1 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractFunctionTypeNode >> argumentType: aViennaTypeNode [ | ||
|
||
self at: 1 put: aViennaTypeNode | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractFunctionTypeNode >> argumentTypes [ | ||
|
||
| argType | | ||
argType := self argumentType. | ||
^ argType isViennaProductTypeNode | ||
ifTrue: [ argType asArray ] | ||
ifFalse: [ Array with: argType ] | ||
] | ||
|
||
{ #category : #private } | ||
ViennaAbstractFunctionTypeNode >> freeIdentifiersExcept: aSet do: aBlock [ | ||
|
||
self argumentType freeIdentifiersExcept: aSet do: aBlock. | ||
self returnType freeIdentifiersExcept: aSet do: aBlock | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAbstractFunctionTypeNode >> isViennaAbstractFunctionTypeNode [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractFunctionTypeNode >> returnType [ | ||
|
||
^ self at: 2 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractFunctionTypeNode >> returnType: aViennaTypeNode [ | ||
|
||
self at: 2 put: aViennaTypeNode | ||
] |
64 changes: 64 additions & 0 deletions
64
repository/ViennaTalk-AST-Core/ViennaAbstractMapTypeNode.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Class { | ||
#name : #ViennaAbstractMapTypeNode, | ||
#superclass : #ViennaTypeNode, | ||
#type : #variable, | ||
#category : #'ViennaTalk-AST-Core' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
ViennaAbstractMapTypeNode class >> domainType: aViennaTypeNode1 rangeType: aViennaTypeNode2 [ | ||
|
||
^ (self new: 2) | ||
domainType: aViennaTypeNode1; | ||
rangeType: aViennaTypeNode2; | ||
yourself | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAbstractMapTypeNode class >> isAbstract [ | ||
|
||
^ self = ViennaAbstractMapTypeNode | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractMapTypeNode >> domainType [ | ||
|
||
^ self at: 1 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractMapTypeNode >> domainType: aViennaTypeNode [ | ||
|
||
self at: 1 put: aViennaTypeNode | ||
] | ||
|
||
{ #category : #private } | ||
ViennaAbstractMapTypeNode >> freeIdentifiersExcept: aSet do: aBlock [ | ||
|
||
self domainType freeIdentifiersExcept: aSet do: aBlock. | ||
self rangeType freeIdentifiersExcept: aSet do: aBlock | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAbstractMapTypeNode >> isViennaAbstractMapTypeNode [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : #'pretty printing' } | ||
ViennaAbstractMapTypeNode >> operatorPrecedence [ | ||
|
||
^ 4 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractMapTypeNode >> rangeType [ | ||
|
||
^ self at: 2 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAbstractMapTypeNode >> rangeType: aViennaTypeNode [ | ||
|
||
self at: 2 put: aViennaTypeNode | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Class { | ||
#name : #ViennaAccessNode, | ||
#superclass : #ViennaDefinitionComponentNode, | ||
#type : #variable, | ||
#category : #'ViennaTalk-AST-Core' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
ViennaAccessNode class >> pure [ | ||
|
||
^ self with: 'pure' | ||
] | ||
|
||
{ #category : #private } | ||
ViennaAccessNode >> boundIdentifiersDo: aBlock [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'pretty printing' } | ||
ViennaAccessNode >> formatWith: aViennaAbstractFormatter [ | ||
|
||
^ aViennaAbstractFormatter | ||
join: ' ' | ||
withAll: (aViennaAbstractFormatter formatAll: self) | ||
] | ||
|
||
{ #category : #private } | ||
ViennaAccessNode >> freeIdentifiersExcept: aSet do: aBlock [ | ||
|
||
|
||
] | ||
|
||
{ #category : #testing } | ||
ViennaAccessNode >> isViennaAccessNode [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAccessNode >> label [ | ||
|
||
^ 'Access' | ||
] | ||
|
||
{ #category : #typechecking } | ||
ViennaAccessNode >> maximalType [ | ||
|
||
^ ViennaType unit | ||
] |
89 changes: 89 additions & 0 deletions
89
repository/ViennaTalk-AST-Core/ViennaAlwaysStatementNode.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
Class { | ||
#name : #ViennaAlwaysStatementNode, | ||
#superclass : #ViennaStatementNode, | ||
#type : #variable, | ||
#category : #'ViennaTalk-AST-Core' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
ViennaAlwaysStatementNode class >> entailingStatement: aViennaStatementNode1 bodyStatement: aViennaStatement2 [ | ||
|
||
^ (self new: 2) | ||
entailingStatement: aViennaStatementNode1; | ||
bodyStatement: aViennaStatement2; | ||
yourself | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAlwaysStatementNode >> bodyStatement [ | ||
|
||
^ self at: 2 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAlwaysStatementNode >> bodyStatement: aViennaStatementNode [ | ||
|
||
self at: 2 put: aViennaStatementNode | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAlwaysStatementNode >> entailingStatement [ | ||
|
||
^ self at: 1 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAlwaysStatementNode >> entailingStatement: aViennaStatementNode [ | ||
|
||
self at: 1 put: aViennaStatementNode | ||
] | ||
|
||
{ #category : #'pretty printing' } | ||
ViennaAlwaysStatementNode >> formatWith: aViennaAbstractFormatter [ | ||
|
||
| entailingStatement statement | | ||
entailingStatement := aViennaAbstractFormatter format: | ||
self entailingStatement. | ||
statement := aViennaAbstractFormatter format: self bodyStatement. | ||
^ (aViennaAbstractFormatter needsIndent: entailingStatement) | ||
ifTrue: [ | ||
(aViennaAbstractFormatter | ||
indentString: (aViennaAbstractFormatter keyword: 'always') | ||
insertCr: entailingStatement) , String cr | ||
, (aViennaAbstractFormatter | ||
indentString: (aViennaAbstractFormatter keyword: 'in') | ||
insertCr: statement) ] | ||
ifFalse: [ | ||
aViennaAbstractFormatter | ||
indentString: | ||
(aViennaAbstractFormatter keyword: 'always ') | ||
, entailingStatement | ||
, (aViennaAbstractFormatter keyword: ' in') | ||
insertCrIfNeeded: statement ] | ||
] | ||
|
||
{ #category : #private } | ||
ViennaAlwaysStatementNode >> freeIdentifiersExcept: aSet do: aBlock [ | ||
|
||
self bodyStatement freeIdentifiersExcept: aSet do: aBlock. | ||
self entailingStatement freeIdentifiersExcept: aSet do: aBlock | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAlwaysStatementNode >> isViennaAlwaysStatementNode [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAlwaysStatementNode >> label [ | ||
|
||
^ 'AlwaysStatement' | ||
] | ||
|
||
{ #category : #typechecking } | ||
ViennaAlwaysStatementNode >> maximalType [ | ||
|
||
self entailingStatement typecheck. | ||
^ self bodyStatement typecheck | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Class { | ||
#name : #ViennaAndNode, | ||
#superclass : #ViennaBinaryOperatorExpressionNode, | ||
#type : #variable, | ||
#category : #'ViennaTalk-AST-Core' | ||
} | ||
|
||
{ #category : #'pretty printing' } | ||
ViennaAndNode >> formatOperatorWith: aViennaAbstractFormatter [ | ||
|
||
^ aViennaAbstractFormatter and | ||
] | ||
|
||
{ #category : #testing } | ||
ViennaAndNode >> isViennaAndNode [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAndNode >> label [ | ||
|
||
^ 'And' | ||
] | ||
|
||
{ #category : #'pretty printing' } | ||
ViennaAndNode >> operatorPrecedence [ | ||
|
||
^ 14 | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAndNode >> paramType1 [ | ||
|
||
^ ViennaType bool | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAndNode >> paramType2 [ | ||
|
||
^ ViennaType bool | ||
] | ||
|
||
{ #category : #accessing } | ||
ViennaAndNode >> returnTypeFor: aViennaType1 and: aViennaType2 [ | ||
|
||
^ ViennaType bool | ||
] |
Oops, something went wrong.