Skip to content

Commit

Permalink
Merge pull request #98 from jecisc/extensions
Browse files Browse the repository at this point in the history
Update classes of extensions
  • Loading branch information
jecisc authored Sep 24, 2024
2 parents b791f66 + 3b62add commit c31f95c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
7 changes: 7 additions & 0 deletions src/Sindarin/ASTAssignmentNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'ASTAssignmentNode' }

{ #category : '*Sindarin' }
ASTAssignmentNode >> skipWithDebugger: aSindarinDebugger [

aSindarinDebugger skipAssignmentNodeCompletely
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Extension { #name : 'RBBlockNode' }
Extension { #name : 'ASTBlockNode' }

{ #category : '*Sindarin' }
RBBlockNode >> executedNodesAfter: aNode [
ASTBlockNode >> executedNodesAfter: aNode [

"Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder"

Expand All @@ -14,13 +14,13 @@ RBBlockNode >> executedNodesAfter: aNode [
]

{ #category : '*Sindarin' }
RBBlockNode >> firstPCOfStatement: aStatementNode [
ASTBlockNode >> firstPCOfStatement: aStatementNode [

^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode
]

{ #category : '*Sindarin' }
RBBlockNode >> nextExecutedNodeAfter: aNode [
ASTBlockNode >> nextExecutedNodeAfter: aNode [

"Find first node that is after aNode that has an associated pc in method node all children (post-order)"

Expand All @@ -32,7 +32,7 @@ RBBlockNode >> nextExecutedNodeAfter: aNode [
]

{ #category : '*Sindarin' }
RBBlockNode >> parentOfIdenticalSubtree: subtree [
ASTBlockNode >> parentOfIdenticalSubtree: subtree [

^ self allChildren reversed
detect: [ :e | e == subtree ]
Expand All @@ -41,7 +41,7 @@ RBBlockNode >> parentOfIdenticalSubtree: subtree [
]

{ #category : '*Sindarin' }
RBBlockNode >> skipWithDebugger: aSindarinDebugger [
ASTBlockNode >> skipWithDebugger: aSindarinDebugger [

aSindarinDebugger skipBlockNode
]
7 changes: 7 additions & 0 deletions src/Sindarin/ASTMessageNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'ASTMessageNode' }

{ #category : '*Sindarin' }
ASTMessageNode >> skipWithDebugger: aSindarinDebugger [

aSindarinDebugger skipMessageNode
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Extension { #name : 'RBMethodNode' }
Extension { #name : 'ASTMethodNode' }

{ #category : '*Sindarin' }
RBMethodNode >> executedNodesAfter: aNode [
ASTMethodNode >> executedNodesAfter: aNode [

"Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder"

Expand All @@ -14,13 +14,13 @@ RBMethodNode >> executedNodesAfter: aNode [
]

{ #category : '*Sindarin' }
RBMethodNode >> firstPCOfStatement: aStatementNode [
ASTMethodNode >> firstPCOfStatement: aStatementNode [

^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode
]

{ #category : '*Sindarin' }
RBMethodNode >> nextExecutedNodeAfter: aNode [
ASTMethodNode >> nextExecutedNodeAfter: aNode [

"Find first node that is after aNode that has an associated pc in method node all children (post-order)"

Expand All @@ -32,7 +32,7 @@ RBMethodNode >> nextExecutedNodeAfter: aNode [
]

{ #category : '*Sindarin' }
RBMethodNode >> parentOfIdenticalSubtree: subtree [
ASTMethodNode >> parentOfIdenticalSubtree: subtree [

^ self allChildren reversed
detect: [ :e | e == subtree ]
Expand All @@ -41,7 +41,7 @@ RBMethodNode >> parentOfIdenticalSubtree: subtree [
]

{ #category : '*Sindarin' }
RBMethodNode >> statementNodeContaining: aNode [
ASTMethodNode >> statementNodeContaining: aNode [

| statementNode parentOfStatementNode |
statementNode := aNode.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Extension { #name : 'RBProgramNode' }
Extension { #name : 'ASTProgramNode' }

{ #category : '*Sindarin' }
RBProgramNode >> allChildrenPostOrder [
ASTProgramNode >> allChildrenPostOrder [

| children |
children := OrderedCollection new.
Expand All @@ -12,7 +12,7 @@ RBProgramNode >> allChildrenPostOrder [
]

{ #category : '*Sindarin' }
RBProgramNode >> skipWithDebugger: aSindarinDebugger [
ASTProgramNode >> skipWithDebugger: aSindarinDebugger [

aSindarinDebugger step
]
7 changes: 7 additions & 0 deletions src/Sindarin/ASTReturnNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'ASTReturnNode' }

{ #category : '*Sindarin' }
ASTReturnNode >> skipWithDebugger: aSindarinDebugger [

aSindarinDebugger skipReturnNode
]
7 changes: 0 additions & 7 deletions src/Sindarin/RBAssignmentNode.extension.st

This file was deleted.

2 changes: 1 addition & 1 deletion src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class {
#name : 'RBBlockDefinitionSearchingVisitor',
#superclass : 'RBProgramNodeVisitor',
#superclass : 'ASTProgramNodeVisitor',
#instVars : [
'blockToSearch',
'isBlockFound'
Expand Down
7 changes: 0 additions & 7 deletions src/Sindarin/RBMessageNode.extension.st

This file was deleted.

7 changes: 0 additions & 7 deletions src/Sindarin/RBReturnNode.extension.st

This file was deleted.

0 comments on commit c31f95c

Please sign in to comment.