Class Parser


back
readMethodName   | name |
self tokenIsName " unary method "
ifTrue: [ name <- token. self nextLex. ^ name ].
self tokenIsBinary " binary method "
ifTrue: [ name <- token. self nextLex.
self tokenIsName
ifFalse: [ self error: 'missing argument'].
self addArgName: token.
self nextLex. ^ name ].
self tokenIsKeyword
ifFalse: [ self error: 'invalid method header'].
name <- ''.
[ self tokenIsKeyword ]
whileTrue: [ name <- name + token. self nextLex.
self tokenIsName
ifFalse: [ self error: 'missing argument'].
self addArgName: token.
self nextLex ].
^ name