Skip to content

Commit c7d4e1e

Browse files
Adding some extension methods to Symbol to make it more polymorphic with P3GIdentifier. This, in particular, solves #2.
1 parent e67aa37 commit c7d4e1e

File tree

8 files changed

+31
-0
lines changed

8 files changed

+31
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
=> aString
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier => aString
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
<- aP3GGenerable
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier <- aP3GGenerable
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
attributeNamed: aString
3+
"Syntax sugar to make the DSL better."
4+
^ P3GAttributeReference target: self asP3GIdentifier attributeIdentifier: aString asP3GIdentifier
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
call
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier call
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
callWith: anArrayOrADictionary
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier callWith: anArrayOrADictionary
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
callWith: anArray with: aDictionary
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier callWith: anArray with: aDictionary
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*Python3Generator
2+
import
3+
"Syntax sugar to make the DSL better."
4+
^ self asP3GIdentifier import
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name" : "Symbol"
3+
}

0 commit comments

Comments
 (0)