PetitCommonMark/software/petitcompiler/PPTokenParser.extension.st

36 lines
634 B
Smalltalk

Extension { #name : 'PPTokenParser' }
{ #category : '*petitcompiler' }
PPTokenParser >> asCompilerNode [
^ PPCTokenNode new
name: self name;
tokenClass: self tokenClass;
child: parser;
yourself
]
{ #category : '*petitcompiler' }
PPTokenParser >> displayName [
^ 'TOKEN[', parser displayName, ']'
]
{ #category : '*petitcompiler' }
PPTokenParser >> isFirstSetTerminal [
^ false
]
{ #category : '*petitcompiler' }
PPTokenParser >> isTokenParser [
^ true
]
{ #category : '*petitcompiler' }
PPTokenParser >> parser [
^ parser
]
{ #category : '*petitcompiler' }
PPTokenParser >> whitespace [
^ self class whitespace
]