misc: Create a combined parser for a small win
This commit is contained in:
parent
f13639d443
commit
07e36f8333
|
@ -90,8 +90,9 @@ PP.PPCompositeParser subclass: SIPGrammar [
|
||||||
|
|
||||||
host [
|
host [
|
||||||
<category: 'generic'>
|
<category: 'generic'>
|
||||||
"TODO: too simplieified"
|
^ (PP.PPPredicateObjectParser on: (PP.PPCharSetPredicate on:
|
||||||
^ (#letter asParser / (PP.PPPredicateObjectParser chars: '0123456789.-' message: 'host')) plus flatten
|
[:char | char isAlphaNumeric or: [
|
||||||
|
'.-' includes: char]]) message: 'host') plus flatten
|
||||||
]
|
]
|
||||||
|
|
||||||
port [
|
port [
|
||||||
|
|
Reference in New Issue