81 lines
1.4 KiB
Smalltalk
81 lines
1.4 KiB
Smalltalk
|
Extension { #name : #PPParser }
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> asPPCMLine [
|
||
|
^ (self map: [ :elems |
|
||
|
PPCMLine new
|
||
|
children: elems;
|
||
|
yourself
|
||
|
]) name: 'asPPCMLine';
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> asPPCMPlainLine [
|
||
|
^ (self map: [ :text |
|
||
|
PPCMPlainLine new
|
||
|
text: text;
|
||
|
yourself
|
||
|
]) name: 'asPPCMPlainLine';
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> asPPCMPlainText [
|
||
|
^ (self map: [ :text |
|
||
|
PPCMPlainText new
|
||
|
text: text;
|
||
|
yourself
|
||
|
]) name: 'asPPCMPlainText';
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> asPPCMText [
|
||
|
^ (self map: [ :text |
|
||
|
PPCMText new
|
||
|
text: text;
|
||
|
yourself
|
||
|
]) name: 'asPPCMText';
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> limitedBy: limiter [
|
||
|
^ (PPLimitParser on: self)
|
||
|
limiter: limiter;
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> preceeds [
|
||
|
^ (PPPreceedsParser on: self)
|
||
|
length: 1;
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> preceeds: length [
|
||
|
^ (PPPreceedsParser on: self)
|
||
|
length: length;
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> where: replacee is: replacement [
|
||
|
^ (PPReplaceParser on: self)
|
||
|
replacee: replacee;
|
||
|
replacement: replacement;
|
||
|
yourself
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> whileFalse: parser [
|
||
|
^ (self not, parser) star
|
||
|
]
|
||
|
|
||
|
{ #category : #'*PetitMarkdown' }
|
||
|
PPParser >> whileFalse: condition consume: parser [
|
||
|
^ (condition not, parser) star
|
||
|
]
|