grammar: Change code flow to reduce some bytecode that are executed
This commit is contained in:
parent
9fa9a7218f
commit
3f47d2f6b0
|
@ -65,19 +65,15 @@ PP.PPParser subclass: SIPQuotedStringParser [
|
||||||
ifTrue: [
|
ifTrue: [
|
||||||
aStream skip: 1.
|
aStream skip: 1.
|
||||||
parsed := true.
|
parsed := true.
|
||||||
finish := true]
|
^text contents]
|
||||||
ifFalse: [
|
ifFalse: [
|
||||||
c = $\ ifTrue: [inQuote := true].
|
c = $\ ifTrue: [inQuote := true].
|
||||||
text nextPut: c.
|
text nextPut: c.
|
||||||
aStream skip: 1.
|
aStream skip: 1.
|
||||||
finish := aStream atEnd]]].
|
finish := aStream atEnd]]].
|
||||||
|
|
||||||
^parsed
|
aStream pointer: aStartPointer.
|
||||||
ifFalse: [
|
^PPFailure message: 'Expected closing quote' at: aStream position
|
||||||
aStream pointer: aStartPointer.
|
|
||||||
PPFailure message: 'Expected closing quote' at: aStream position]
|
|
||||||
ifTrue: [
|
|
||||||
text contents].
|
|
||||||
]
|
]
|
||||||
|
|
||||||
parseOn: aStream [
|
parseOn: aStream [
|
||||||
|
|
Reference in New Issue