-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17120 from jecisc/ast/rename-last-classes
Rename AST tokens to start with AST prefix
- Loading branch information
Showing
26 changed files
with
229 additions
and
214 deletions.
There are no files selected for viewing
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
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
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,27 @@ | ||
" | ||
ASTAssignmentToken is the first-class representation of the assignment token ':=' | ||
" | ||
Class { | ||
#name : 'ASTAssignmentToken', | ||
#superclass : 'ASTToken', | ||
#category : 'AST-Core-Tokens', | ||
#package : 'AST-Core', | ||
#tag : 'Tokens' | ||
} | ||
|
||
{ #category : 'testing' } | ||
ASTAssignmentToken >> isAssignment [ | ||
^true | ||
] | ||
|
||
{ #category : 'accessing' } | ||
ASTAssignmentToken >> length [ | ||
|
||
^ 2 | ||
] | ||
|
||
{ #category : 'evaluating' } | ||
ASTAssignmentToken >> value [ | ||
^':=' | ||
] |
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,21 @@ | ||
" | ||
ASTBinarySelectorToken is the first-class representation of a binary selector (e.g. +) | ||
" | ||
Class { | ||
#name : 'ASTBinarySelectorToken', | ||
#superclass : 'ASTValueToken', | ||
#category : 'AST-Core-Tokens', | ||
#package : 'AST-Core', | ||
#tag : 'Tokens' | ||
} | ||
|
||
{ #category : 'testing' } | ||
ASTBinarySelectorToken >> isBinary [ | ||
^true | ||
] | ||
|
||
{ #category : 'testing' } | ||
ASTBinarySelectorToken >> isBinary: aString [ | ||
^ value = aString | ||
] |
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
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
12 changes: 6 additions & 6 deletions
12
src/AST-Core/RBEOFToken.class.st → src/AST-Core/ASTEOFToken.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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
Class { | ||
#name : 'RBEOFToken', | ||
#superclass : 'RBToken', | ||
#name : 'ASTEOFToken', | ||
#superclass : 'ASTToken', | ||
#category : 'AST-Core-Tokens', | ||
#package : 'AST-Core', | ||
#tag : 'Tokens' | ||
} | ||
|
||
{ #category : 'testing' } | ||
RBEOFToken >> isEOF [ | ||
ASTEOFToken >> isEOF [ | ||
^true | ||
] | ||
|
||
{ #category : 'accessing' } | ||
RBEOFToken >> length [ | ||
ASTEOFToken >> length [ | ||
^ 0 | ||
] | ||
|
||
{ #category : 'accessing' } | ||
RBEOFToken >> source [ | ||
ASTEOFToken >> source [ | ||
^ self value | ||
] | ||
|
||
{ #category : 'accessing' } | ||
RBEOFToken >> value [ | ||
ASTEOFToken >> value [ | ||
|
||
^ '' | ||
] |
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
12 changes: 6 additions & 6 deletions
12
src/AST-Core/RBIdentifierToken.class.st → src/AST-Core/ASTIdentifierToken.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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
" | ||
RBIdentifierToken is the first-class representation of an identifier token (e.g. Class) | ||
ASTIdentifierToken is the first-class representation of an identifier token (e.g. Class) | ||
" | ||
Class { | ||
#name : 'RBIdentifierToken', | ||
#superclass : 'RBValueToken', | ||
#name : 'ASTIdentifierToken', | ||
#superclass : 'ASTValueToken', | ||
#category : 'AST-Core-Tokens', | ||
#package : 'AST-Core', | ||
#tag : 'Tokens' | ||
} | ||
|
||
{ #category : 'testing' } | ||
RBIdentifierToken >> isIdentifier [ | ||
ASTIdentifierToken >> isIdentifier [ | ||
^true | ||
] | ||
|
||
{ #category : 'testing' } | ||
RBIdentifierToken >> isKeywordPattern [ | ||
ASTIdentifierToken >> isKeywordPattern [ | ||
^ self isPatternVariable and: [ value second = RBScanner keywordPatternCharacter | ||
and: [ value third ~= RBScanner cascadePatternCharacter ] ] | ||
] | ||
|
||
{ #category : 'testing' } | ||
RBIdentifierToken >> isPatternVariable [ | ||
ASTIdentifierToken >> isPatternVariable [ | ||
^value first = RBScanner patternVariableCharacter | ||
] |
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
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
Oops, something went wrong.